Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorNoAuthorizationHeader = errors.New("authorization header required") ErrorNotBearerSchemeRequest = errors.New("authorization requires Bearer scheme") ErrorUnableToVerifySignature = errors.New("unable to verify signature") ErrorTokenVerificationKey = errors.New("error retrieving token verification key") ErrorCertificatePemNull = errors.New("error retrieving token verification key, certificate pem is null") ErrorParsingCertificate = errors.New("error retrieving token verification key, error parsing certificate") ErrorInvalidTokenIssueTime = errors.New("invalid issued time on token") ErrorTokenExpired = errors.New("token has expired") ErrorInvalidTokenAudience = errors.New("invalid token audience") ErrorUnableToVerifyToken = errors.New("unable to verify token") ErrorUnsupportedAuthProvider = errors.New("unsupported auth provider") )
Functions ¶
Types ¶
type AuthProvider ¶
type AuthProvider interface { AuthenticationHandler(next http.HandlerFunc) http.HandlerFunc ValidateToken(token string, jwtToken *jwt.JWT) (bool, error) }
func NewAuthenticationProvider ¶
func NewAuthenticationProvider(provider AuthProviderType, iss string, aud string) (AuthProvider, error)
type KeyProvider ¶
Click to show internal directories.
Click to hide internal directories.