Skip to content

Commit

Permalink
feat: remove matching algorithm to decode all tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
mehditeymorian committed Aug 29, 2022
1 parent 63765dd commit 03c6f09
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions internal/jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ func Encode(encode model.Encode, key any) (string, error) {

func Decode(strToken string, key any, algorithm string) (*jwt.Token, error) {
token, err := jwt.Parse(strToken, func(token *jwt.Token) (interface{}, error) {
if token.Method.Alg() != algorithm {
return nil, errInvalidSigningMethod
}

return key, nil
})
Expand Down

0 comments on commit 03c6f09

Please sign in to comment.