JWTProvider is the interface to define providers for doing JWT authentication.
| 45 | // JWTProvider is the interface to define providers for doing JWT |
| 46 | // authentication. |
| 47 | type JWTProvider interface { |
| 48 | KeyFunc() jwt.Keyfunc |
| 49 | VerifyAudience(jwt.MapClaims) bool |
| 50 | VerifyIssuer(jwt.MapClaims) bool |
| 51 | SetContextValues(context.Context, jwt.MapClaims) (context.Context, error) |
| 52 | } |
| 53 | |
| 54 | // NewProvider creates a new JWT provider based on the config values |
| 55 | func NewProvider(config JWTConfig) (JWTProvider, error) { |
no outgoing calls
no test coverage detected