Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
4be029c6
Commit
4be029c6
authored
Feb 24, 2017
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage/kubernetes: fix kubernetes storage conformance test failures
parent
c76832ea
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
client.go
storage/kubernetes/client.go
+3
-0
storage.go
storage/kubernetes/storage.go
+1
-1
types.go
storage/kubernetes/types.go
+6
-1
No files found.
storage/kubernetes/client.go
View file @
4be029c6
...
...
@@ -135,6 +135,9 @@ func checkHTTPErr(r *http.Response, validStatusCodes ...int) error {
if
r
.
StatusCode
==
http
.
StatusNotFound
{
return
storage
.
ErrNotFound
}
if
r
.
Request
.
Method
==
"POST"
&&
r
.
StatusCode
==
http
.
StatusConflict
{
return
storage
.
ErrAlreadyExists
}
var
url
,
method
string
if
r
.
Request
!=
nil
{
...
...
storage/kubernetes/storage.go
View file @
4be029c6
...
...
@@ -31,7 +31,7 @@ const (
resourceRefreshToken
=
"refreshtokens"
resourceKeys
=
"signingkeies"
// Kubernetes attempts to pluralize.
resourcePassword
=
"passwords"
resourceOfflineSessions
=
"offlinesessions
"
resourceOfflineSessions
=
"offlinesessions
es"
// Again attempts to pluralize.
)
// Config values for the Kubernetes storage type.
...
...
storage/kubernetes/types.go
View file @
4be029c6
...
...
@@ -502,9 +502,14 @@ func (cli *client) fromStorageOfflineSessions(o storage.OfflineSessions) Offline
}
func
toStorageOfflineSessions
(
o
OfflineSessions
)
storage
.
OfflineSessions
{
return
storage
.
OfflineSessions
{
s
:=
storage
.
OfflineSessions
{
UserID
:
o
.
UserID
,
ConnID
:
o
.
ConnID
,
Refresh
:
o
.
Refresh
,
}
if
s
.
Refresh
==
nil
{
// Server code assumes this will be non-nil.
s
.
Refresh
=
make
(
map
[
string
]
*
storage
.
RefreshTokenRef
)
}
return
s
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment