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
2c036939
Commit
2c036939
authored
Jan 09, 2017
by
rithu john
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: Add ConnectorData to storage RefreshToken.
parent
ec9d1607
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
0 deletions
+4
-0
conformance.go
storage/conformance/conformance.go
+1
-0
storage.go
storage/kubernetes/storage.go
+2
-0
types.go
storage/kubernetes/types.go
+1
-0
No files found.
storage/conformance/conformance.go
View file @
2c036939
...
@@ -219,6 +219,7 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) {
...
@@ -219,6 +219,7 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) {
EmailVerified
:
true
,
EmailVerified
:
true
,
Groups
:
[]
string
{
"a"
,
"b"
},
Groups
:
[]
string
{
"a"
,
"b"
},
},
},
ConnectorData
:
[]
byte
(
`{"some":"data"}`
),
}
}
if
err
:=
s
.
CreateRefresh
(
refresh
);
err
!=
nil
{
if
err
:=
s
.
CreateRefresh
(
refresh
);
err
!=
nil
{
t
.
Fatalf
(
"create refresh token: %v"
,
err
)
t
.
Fatalf
(
"create refresh token: %v"
,
err
)
...
...
storage/kubernetes/storage.go
View file @
2c036939
...
@@ -167,6 +167,7 @@ func (cli *client) CreateRefresh(r storage.RefreshToken) error {
...
@@ -167,6 +167,7 @@ func (cli *client) CreateRefresh(r storage.RefreshToken) error {
Scopes
:
r
.
Scopes
,
Scopes
:
r
.
Scopes
,
Nonce
:
r
.
Nonce
,
Nonce
:
r
.
Nonce
,
Claims
:
fromStorageClaims
(
r
.
Claims
),
Claims
:
fromStorageClaims
(
r
.
Claims
),
ConnectorData
:
r
.
ConnectorData
,
}
}
return
cli
.
post
(
resourceRefreshToken
,
refresh
)
return
cli
.
post
(
resourceRefreshToken
,
refresh
)
}
}
...
@@ -249,6 +250,7 @@ func (cli *client) GetRefresh(id string) (storage.RefreshToken, error) {
...
@@ -249,6 +250,7 @@ func (cli *client) GetRefresh(id string) (storage.RefreshToken, error) {
Scopes
:
r
.
Scopes
,
Scopes
:
r
.
Scopes
,
Nonce
:
r
.
Nonce
,
Nonce
:
r
.
Nonce
,
Claims
:
toStorageClaims
(
r
.
Claims
),
Claims
:
toStorageClaims
(
r
.
Claims
),
ConnectorData
:
r
.
ConnectorData
,
},
nil
},
nil
}
}
...
...
storage/kubernetes/types.go
View file @
2c036939
...
@@ -369,6 +369,7 @@ type RefreshToken struct {
...
@@ -369,6 +369,7 @@ type RefreshToken struct {
Claims
Claims
`json:"claims,omitempty"`
Claims
Claims
`json:"claims,omitempty"`
ConnectorID
string
`json:"connectorID,omitempty"`
ConnectorID
string
`json:"connectorID,omitempty"`
ConnectorData
[]
byte
`json:"connectorData,omitempty"`
}
}
// RefreshList is a list of refresh tokens.
// RefreshList is a list of refresh tokens.
...
...
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