auth

package
v0.0.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClaimHandler

func AddClaimHandler(next http.Handler) http.Handler

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.

func (*FetchClaim) Validate

func (*FetchClaim) Validate(context.Context) error

Validate implements validator.CustomClaims.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL