Versions in this module Expand all Collapse all v1 v1.0.1 Sep 29, 2023 Changes in this version + const ClaimsContextKey + const JWKSWellKnowCertURI + const OIDCWellKnownURI + const TokenLocCookie + const TokenLocHeader + const TokenLocQuery + const TokenTypeBasicAuth + const TokenTypeBearer + const TokenTypeNone + func NewSharedFetcher(ctx context.Context) *jwk.AutoRefresh + type Claims struct + func NewMapClaims(claims jwt.MapClaims) *Claims + func (m *Claims) Get(key string) interface{} + func (m *Claims) GetString(key string) string + func (m *Claims) VerifyScope(cmp string, required bool) bool + type Discoverer struct + type JWTEndpoints struct + AuthorizationEndpoint string + EndSessionEndpoint string + IntrospectionEndpoint string + Issuer string + JwksURI string + RegistrationEndpoint string + RevocationEndpoint string + TokenEndpoint string + UserinfoEndpoint string + func DiscoverOidcEndpoints(hclient *http.Client, oidcBaseURL string) (*JWTEndpoints, error) + type JWTValidator struct + JwksURI string + OIDCEndpoints map[string]*JWTEndpoints + OnlineValidation bool + PublicKey interface{} + func NewJWTValidator(opts ...ValidatorOption) (*JWTValidator, error) + func (jv *JWTValidator) DiscoverEndpoints(oidcBaseURL string) error + func (jv *JWTValidator) GetClaims(r *http.Request) *Claims + func (jv *JWTValidator) Middleware(next http.Handler) http.Handler + func (jv *JWTValidator) ParseIfAPIGWValidated(r *http.Request) (*Claims, error) + func (jv *JWTValidator) ParseTokenWithoutValidation(token string) (*Claims, error) + func (jv *JWTValidator) ParseWithoutValidation(r *http.Request) (*Claims, error) + func (jv *JWTValidator) Validate(r *http.Request) (*Claims, error) + func (jv *JWTValidator) ValidateToken(token string) (*Claims, error) + type OIDCConfiguration struct + AuthURL string + Issuer string + JWKSURL string + TokenURL string + UserInfoURL string + type TokenInfo struct + type ValidatorContextKey string + type ValidatorOption func(validator *JWTValidator) error + func OptionDiscoverJWKSCertsURI(idpHREF string) ValidatorOption + func OptionEnableOnlineValidation() ValidatorOption + func OptionSetJWKSFetcher(fetcher *jwk.AutoRefresh) ValidatorOption + func OptionSetJWKSWellKnownURI(uri string) ValidatorOption + func OptionSetPublicKey(pemOrFile string) ValidatorOption + type WellKnownIssuer struct + CertURI string + IssRE *regexp.Regexp