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) committed Jan 24, 2017
1 parent fe31f1f commit c9b1656
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oauth2/consent_strategy.go
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 c9b1656

Please sign in to comment.