Documentation
¶
Index ¶
- func AddClaimHandler(next http.Handler) http.Handler
- func ErrorHandler(w http.ResponseWriter, r *http.Request, err error)
- func GetValidatedClaims(ctx context.Context) (*validator.ValidatedClaims, bool)
- func NewJWTMiddleware(issuer, jwksURI string) (*jwtmiddleware.JWTMiddleware, error)
- type FetchClaim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddClaimHandler ¶
AddClaimHandler puts *tokenclaims.Token into graph.ClaimsContextKey for resolvers.
func ErrorHandler ¶
func ErrorHandler(w http.ResponseWriter, r *http.Request, err error)
ErrorHandler logs JWT validation errors and calls the default handler.
func GetValidatedClaims ¶
func GetValidatedClaims(ctx context.Context) (*validator.ValidatedClaims, bool)
GetValidatedClaims returns validated claims from context.
func NewJWTMiddleware ¶
func NewJWTMiddleware(issuer, jwksURI string) (*jwtmiddleware.JWTMiddleware, error)
NewJWTMiddleware creates JWT middleware with token-exchange issuer/JWKS.
Types ¶
type FetchClaim ¶
type FetchClaim struct {
tokenclaims.Token
}
FetchClaim wraps tokenclaims.Token for auth0 validator and injects into graph.ClaimsContextKey.
Click to show internal directories.
Click to hide internal directories.