Skip to content

Commit

Permalink
oauth2: invalid consent response causes panic - closes #369
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) authored and arekkas committed Feb 11, 2017
1 parent 0401de9 commit 868a02b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oauth2/consent_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func (s *DefaultConsentStrategy) ValidateResponse(a fosite.AuthorizeRequester, t
}
return rsaKey, nil
})
if err != nil {
return nil, errors.Wrap(err, "The consent response is not a valid JSON Web Token")
}

// make sure to use MapClaims since that is the default..
jwtClaims, ok := t.Claims.(jwt.MapClaims)
Expand Down

0 comments on commit 868a02b

Please sign in to comment.