Versions in this module Expand all Collapse all v1 v1.0.1 Dec 11, 2023 Changes in this version + func FetchJWKS(url string) (map[string]interface{}, error) + func JWKThumbprint(jwk JSONWebKey) string + func New(_ context.Context, next http.Handler, config *Config, name string) (http.Handler, error) + func SetupSecret(secret string) (interface{}, error) + type Config struct + CookieName string + ForwardToken bool + Freshness int64 + HeaderMap map[string]string + HeaderName string + Issuers []string + Optional bool + ParameterName string + RedirectForbidden string + RedirectUnauthorized string + Require map[string]interface{} + Secret string + ValidMethods []string + func CreateConfig() *Config + type JSONWebKey struct + Alg string + Crv string + D string + Dp string + Dq string + E string + K string + Kid string + Kty string + N string + P string + Q string + Qi string + Use string + X string + X5c []string + X5t string + Y string + type JSONWebKeySet struct + Keys []JSONWebKey + type JWTPlugin struct + func (plugin *JWTPlugin) GetKey(token *jwt.Token) (interface{}, error) + func (plugin *JWTPlugin) IsValidIssuer(issuer string) bool + func (plugin *JWTPlugin) ServeHTTP(response http.ResponseWriter, request *http.Request) + func (plugin *JWTPlugin) Validate(request *http.Request, variables *TemplateVariables) (int, error) + func (plugin *JWTPlugin) ValidateClaim(claim string, claims jwt.MapClaims, requirements []Requirement, ...) bool + type Requirement interface + Validate func(value interface{}, variables *TemplateVariables) bool + type TemplateRequirement struct + func (requirement TemplateRequirement) Validate(value interface{}, variables *TemplateVariables) bool + type TemplateVariables struct + Host string + Path string + Scheme string + URL string + type ValueRequirement struct + func (requirement ValueRequirement) Validate(value interface{}, variables *TemplateVariables) bool + func (requirement ValueRequirement) ValidateNested(value interface{}) bool