Helper function to generate a valid token with custom claims
()
| 35 | |
| 36 | // Helper function to generate a valid token with custom claims |
| 37 | func generateValidToken() string { |
| 38 | token := jwt.NewWithClaims(mockSigningMethod, jwt.MapClaims{"foo": "bar"}) |
| 39 | tokenString, _ := token.SignedString([]byte("secret")) |
| 40 | return tokenString |
| 41 | } |
| 42 | |
| 43 | func genericClaimsFunc() ClaimsFunc { |
| 44 | return func() jwt.Claims { |
no outgoing calls
no test coverage detected