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
12342149
Commit
12342149
authored
Oct 16, 2015
by
Joe Bowers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup: document parseAndVerifyTokenClaims behavior
parent
39ee1871
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
user.go
user/user.go
+5
-0
No files found.
user/user.go
View file @
12342149
...
...
@@ -448,6 +448,11 @@ type TokenClaims struct {
Claims
jose
.
Claims
}
// Returns TokenClaims if and only if
// - the given token string is an appropriately formatted JWT
// - the JWT contains nonempty "aud" and "sub" claims
// - the JWT can be verified for the client associated with the "aud" claim
// using the given keys
func
parseAndVerifyTokenClaims
(
token
string
,
issuer
url
.
URL
,
keys
[]
key
.
PublicKey
)
(
TokenClaims
,
error
)
{
jwt
,
err
:=
jose
.
ParseJWT
(
token
)
if
err
!=
nil
{
...
...
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