mirror of https://github.com/golang-jwt/jwt.git
Separate verification into its own function
Signed-off-by: Nathanael DEMACON <quantumsheep@users.noreply.github.com>
This commit is contained in:
parent
62e504c281
commit
8948599bbe
|
@ -58,6 +58,12 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
|
||||||
return token, err
|
return token, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return p.VerifyToken(token, parts, claims, keyFunc)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *Parser) VerifyToken(token *Token, parts []string, claims Claims, keyFunc Keyfunc) (*Token, error) {
|
||||||
|
var err error
|
||||||
|
|
||||||
// Verify signing method is in the required set
|
// Verify signing method is in the required set
|
||||||
if p.validMethods != nil {
|
if p.validMethods != nil {
|
||||||
var signingMethodValid = false
|
var signingMethodValid = false
|
||||||
|
|
Loading…
Reference in New Issue