Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-bansal committed Sep 22, 2021
1 parent 4578870 commit 12b4d6a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions x/jwt_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,5 @@ func ExtractJWTNamespace(ctx context.Context) (uint64, error) {
if err != nil {
return 0, err
}
claims, err := ParseJWT(jwtString)
if err != nil {
return 0, err
}

namespace, ok := claims["namespace"].(float64)
if !ok {
return 0, errors.Errorf("namespace in claims is not valid:%v", namespace)
}
return uint64(namespace), nil
return ExtractNamespaceFromJwt(jwtString)
}

0 comments on commit 12b4d6a

Please sign in to comment.