Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvOAuthJwksUrl string = "HEXA_TOKEN_JWKSURL" EnvJwtAuth string = "HEXA_JWT_AUTH_ENABLE" EnvJwtRealm string = "HEXA_JWT_REALM" EnvJwtAudience string = "HEXA_JWT_AUDIENCE" EnvJwtScope string = "HEXA_JWT_SCOPE" EnvOAuthClientId string = "HEXA_OAUTH_CLIENT_ID" EnvOAuthClientSecret string = "HEXA_OAUTH_CLIENT_SECRET" EnvOAuthClientScope string = "HEXA_OAUTH_CLIENT_SCOPE" EnvOAuthTokenEndpoint string = "HEXA_OAUTH_TOKEN_ENDPOINT" )
Variables ¶
This section is empty.
Functions ¶
func JwtAuthenticationHandler ¶
func JwtAuthenticationHandler(next http.HandlerFunc, s *ResourceJwtAuthorizer) http.HandlerFunc
Types ¶
type AccessTokenInfo ¶
type AccessTokenInfo struct { *jwt.RegisteredClaims Scope string `json:"scope"` }
type HTTPClient ¶
type JwtClientHandler ¶
func NewJwtClientHandler ¶
func NewJwtClientHandler() JwtClientHandler
NewJwtClientHandler opens a new JwtClientHandler which allows an OAuth Client to make calls to a JWT protected endpoint. Configuration parameters are pulled from environment variables.
func NewJwtClientHandlerWithConfig ¶
func NewJwtClientHandlerWithConfig(config *clientcredentials.Config) JwtClientHandler
NewJwtClientHandlerWithConfig opens a new JwtClientHandler which allows an OAuth Client to make calls to a JWT protected endpoint. The `config` parameter specifies a client credential for the OAuth2 Client Credential Flow
type ResourceJwtAuthorizer ¶
type ResourceJwtAuthorizer struct { Key keyfunc.Keyfunc Aud string Scope string // contains filtered or unexported fields }
func NewResourceJwtAuthorizer ¶
func NewResourceJwtAuthorizer() *ResourceJwtAuthorizer
Click to show internal directories.
Click to hide internal directories.