Skip to content

Commit

Permalink
Separate verification into its own function
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael DEMACON <quantumsheep@users.noreply.github.com>
  • Loading branch information
quantumsheep committed Jul 4, 2024
1 parent 62e504c commit 8948599
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
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
if p.validMethods != nil {
var signingMethodValid = false
Expand Down

0 comments on commit 8948599

Please sign in to comment.