mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-11 12:43:14 -05:00
Merge pull request #26 from slax0rr/master
Truly support jwtauth.Claims when parsing from context
This commit is contained in:
commit
53a0a4877a
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ func FromContext(ctx context.Context) (*jwt.Token, Claims, error) {
|
||||||
if token != nil {
|
if token != nil {
|
||||||
switch tokenClaims := token.Claims.(type) {
|
switch tokenClaims := token.Claims.(type) {
|
||||||
case Claims:
|
case Claims:
|
||||||
// Nop.
|
claims = tokenClaims
|
||||||
case jwt.MapClaims:
|
case jwt.MapClaims:
|
||||||
claims = Claims(tokenClaims)
|
claims = Claims(tokenClaims)
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue