Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/auth0/go-jwt-middleware
/ functions
Functions
744 in github.com/auth0/go-jwt-middleware
⨍
Functions
744
◇
Types & classes
102
↓ 1 callers
Method
GetName
()
examples/grpc-example/proto/greeter.pb.go:64
↓ 1 callers
Method
GetPublicKey
GetPublicKey returns the public key from the DPoP proof's JWK.
core/dpop.go:115
↓ 1 callers
Method
GetPublicKey
GetPublicKey returns the public key from the DPoP proof's JWK. This method implements the core.DPoPProofClaims interface.
validator/dpop_claims.go:73
↓ 1 callers
Method
GetPublicKeyThumbprint
GetPublicKeyThumbprint returns the calculated JKT from the DPoP proof's JWK.
core/dpop.go:112
↓ 1 callers
Method
GetPublicKeyThumbprint
GetPublicKeyThumbprint returns the calculated JKT from the DPoP proof's JWK. This method implements the core.DPoPProofClaims interface.
validator/dpop_claims.go:67
↓ 1 callers
Method
HasConfirmation
HasConfirmation returns true if the token has a cnf claim.
core/dpop.go:125
↓ 1 callers
Method
Info
(msg string, args ...any)
integrations/grpc/option.go:19
↓ 1 callers
Method
Is
Is allows the error to be compared with ErrJWTInvalid.
core/errors.go:54
↓ 1 callers
Function
NewRedisCache
NewRedisCache creates a new Redis-backed cache for JWKS.
examples/http-multi-issuer-redis-example/main.go:29
↓ 1 callers
Method
Unwrap
Unwrap allows the error to support equality to the underlying error and not just ErrJWTInvalid.
error_handler.go:486
↓ 1 callers
Method
Unwrap
Unwrap returns the underlying error for error unwrapping.
core/errors.go:49
↓ 1 callers
Method
Validate
(context.Context)
validator/claims.go:35
↓ 1 callers
Method
ValidateDPoPProof
(ctx context.Context, proofString string)
option.go:26
↓ 1 callers
Function
WithStrictJWKSURIOrigin
WithStrictJWKSURIOrigin enables strict validation that the jwks_uri returned by OIDC discovery shares the same scheme and host as the issuer URL. Thi
jwks/option.go:130
↓ 1 callers
Method
applyDefaults
applyDefaults sets secure default values for optional fields
middleware.go:150
↓ 1 callers
Method
applyDefaults
applyDefaults sets secure default values for optional fields.
integrations/grpc/interceptor.go:73
↓ 1 callers
Method
backgroundRefresh
backgroundRefresh refreshes JWKS in the background without blocking requests. This prevents cache expiry from blocking requests by proactively refresh
jwks/provider.go:288
↓ 1 callers
Function
buildJWTForTesting
(t *testing.T, username string)
examples/http-example/main_test.go:52
↓ 1 callers
Function
buildJWTForTesting
(t *testing.T, jwk *jose.JSONWebKey, issuer, subject string, audience []string)
examples/http-jwks-example/main_test.go:113
↓ 1 callers
Function
checkJWT
checkJWT is an iris.Handler middleware that will check the validity of our JWT.
examples/iris-example/middleware.go:33
↓ 1 callers
Function
checkJWT
checkJWT is a gin.HandlerFunc middleware that will check the validity of our JWT.
examples/gin-example/middleware.go:32
↓ 1 callers
Function
computeATH
computeATH computes the ATH (Access Token Hash) claim for DPoP proofs
examples/http-dpop-example/main_integration_test.go:28
↓ 1 callers
Function
computeATH
computeATH computes the ATH (Access Token Hash) claim for DPoP proofs
examples/http-dpop-required/main_integration_test.go:30
↓ 1 callers
Method
createCore
createCore creates the core.Core instance with the configured options
middleware.go:115
↓ 1 callers
Method
createCore
createCore creates the core.Core instance with the configured options.
integrations/grpc/interceptor.go:83
↓ 1 callers
Function
createDPoPProofWithTime
(key jwk.Key, httpMethod, httpURL, accessToken string, timestamp time.Time)
examples/http-dpop-required/main_integration_test.go:988
↓ 1 callers
Function
createExpiredBearerToken
(sub, scope string)
examples/http-dpop-disabled/main_integration_test.go:802
↓ 1 callers
Method
customClaimsExist
()
validator/validator.go:420
↓ 1 callers
Method
discoverJWKSURI
discoverJWKSURI discovers the JWKS URI from the well-known endpoint. Uses mutex + discovered flag so that transient failures (network blips, IdP 503s)
jwks/provider.go:441
↓ 1 callers
Method
extractAndValidateClaims
extractAndValidateClaims extracts claims from the token and validates them. Optimized to minimize method calls and allocations. Note: Issuer is valida
validator/validator.go:329
↓ 1 callers
Function
file_proto_greeter_proto_init
()
examples/grpc-example/proto/greeter.pb.go:279
↓ 1 callers
Function
generateJWK
(t *testing.T)
examples/http-jwks-example/main_test.go:61
↓ 1 callers
Function
generateTestTokenWithKid
generateTestTokenWithKid creates a test JWT token with a specific kid in the header. Used for testing jwk.Set key matching with multi-algorithm config
validator/validator_test.go:1386
↓ 1 callers
Function
generateTestTokenWithoutIssuer
generateTestTokenWithoutIssuer creates a test JWT token without an issuer claim. Used for testing issuer validation failures.
validator/validator_test.go:1368
↓ 1 callers
Function
generateToken
generateToken creates a test JWT token
examples/grpc-example/client/main.go:25
↓ 1 callers
Method
get
(tenantID string)
examples/http-dynamic-issuer-example/main.go:38
↓ 1 callers
Method
getJWKSURI
getJWKSURI returns the JWKS URI, discovering it if necessary.
jwks/provider.go:472
↓ 1 callers
Method
getOrCreateProvider
getOrCreateProvider retrieves an existing provider for the issuer or creates a new one. Uses double-checked locking for optimal performance and thread
jwks/multi_issuer_provider.go:197
↓ 1 callers
Function
getTenantIssuersFromDB
getTenantIssuersFromDB simulates a database query In production, replace this with actual database call
examples/http-dynamic-issuer-example/main.go:76
↓ 1 callers
Method
logInfo
logInfo logs an info message if the logger is configured.
core/dpop.go:580
↓ 1 callers
Function
mapErrorToResponse
mapErrorToResponse maps errors to appropriate HTTP responses with WWW-Authenticate headers. In DPoP allowed mode, returns both Bearer and DPoP challen
error_handler.go:123
↓ 1 callers
Function
mapValidationError
mapValidationError maps core.ValidationError codes to HTTP responses with appropriate WWW-Authenticate headers.
error_handler.go:160
↓ 1 callers
Function
mapValidationError
mapValidationError maps core.ValidationError to gRPC status codes. This function relies on error codes from core package for reliable error classifica
integrations/grpc/error_handler.go:53
↓ 1 callers
Function
newIssuerCache
(ttl time.Duration)
examples/http-dynamic-issuer-example/main.go:31
↓ 1 callers
Function
sameOrigin
sameOrigin compares two URLs for same-origin equality following RFC 3986: - Schemes are compared case-insensitively (Section 3.1) - Hosts are compared
internal/oidc/oidc.go:156
↓ 1 callers
Method
set
(tenantID string, issuers []string)
examples/http-dynamic-issuer-example/main.go:50
↓ 1 callers
Function
setupTestServer
( t *testing.T, expectedJWKS jwk.Set, expectedCustomJWKS jwk.Set, requestCount *int32, )
jwks/provider_test.go:1084
↓ 1 callers
Function
setupTestServer
(t *testing.T, jwk *jose.JSONWebKey)
examples/http-jwks-example/main_test.go:77
↓ 1 callers
Method
shouldSkipValidation
shouldSkipValidation checks if JWT validation should be skipped for this request.
middleware.go:205
↓ 1 callers
Function
tenantMiddleware
tenantMiddleware extracts tenant ID from request headers In production, this might extract from subdomain, path, or custom header
examples/http-dynamic-issuer-example/main.go:123
↓ 1 callers
Method
validate
validate ensures all required fields are set
middleware.go:107
↓ 1 callers
Method
validate
validate ensures all required fields are set.
core/option.go:51
↓ 1 callers
Method
validate
validate ensures all required fields are set.
validator/validator.go:168
↓ 1 callers
Method
validateATH
validateATH validates the ATH (Access Token Hash) claim. Per RFC 9449 Section 4.2, the ath claim is REQUIRED for sender-constraining security. Without
core/dpop.go:482
↓ 1 callers
Method
validateDPoPProofJWT
validateDPoPProofJWT validates the DPoP proof JWT and returns the claims.
core/dpop.go:448
↓ 1 callers
Method
validateDPoPToken
validateDPoPToken validates a DPoP token with proof.
core/dpop.go:374
↓ 1 callers
Method
validateHTMAndHTU
validateHTMAndHTU validates the HTM (HTTP method) and HTU (HTTP URI) claims.
core/dpop.go:507
↓ 1 callers
Method
validateIATFreshness
validateIATFreshness validates that the DPoP proof IAT is within acceptable bounds.
core/dpop.go:530
↓ 1 callers
Method
validateJKTBinding
validateJKTBinding verifies that the DPoP proof JKT matches the token's cnf.jkt claim.
core/dpop.go:467
↓ 1 callers
Method
validateToken
validateToken performs JWT validation with or without DPoP support.
middleware.go:228
Method
Debug
(msg string, args ...any)
middleware.go:41
Method
Debug
(msg string, args ...any)
option_test.go:792
Method
Debug
(msg string, args ...any)
core/core.go:22
Method
Debug
(msg string, args ...any)
core/core_test.go:45
Method
Debug
(msg string, args ...any)
integrations/grpc/interceptor_test.go:798
Method
Descriptor
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
examples/grpc-example/proto/greeter.pb.go:60
Method
Descriptor
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
examples/grpc-example/proto/greeter.pb.go:109
Method
Descriptor
Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead.
examples/grpc-example/proto/greeter.pb.go:162
Method
Descriptor
Deprecated: Use HealthCheckReply.ProtoReflect.Descriptor instead.
examples/grpc-example/proto/greeter.pb.go:203
Method
Error
(msg string, args ...any)
middleware.go:44
Method
Error
(msg string, args ...any)
option_test.go:804
Method
Error
(msg string, args ...any)
core/core.go:25
Method
Error
(msg string, args ...any)
core/core_test.go:57
Method
Error
(msg string, args ...any)
integrations/grpc/interceptor_test.go:816
Method
Get
(ctx context.Context, jwksURI string)
jwks/provider.go:125
Method
Get
(ctx context.Context, jwksURI string)
jwks/multi_issuer_provider_test.go:466
Method
Get
(ctx context.Context, jwksURI string)
jwks/provider_test.go:1043
Method
Get
(ctx context.Context, jwksURI string)
jwks/provider_test.go:1053
Method
Get
Get retrieves JWKS from Redis or fetches it if not cached.
examples/http-multi-issuer-redis-example/main.go:55
Method
GetATH
()
core/dpop_test.go:63
Method
GetATH
GetATH returns the access token hash (ath) from the DPoP proof. This is an optional claim that binds the proof to a specific access token. This method
validator/dpop_claims.go:80
Method
GetAuthenticatedAs
()
examples/grpc-example/proto/greeter.pb.go:120
Function
GetClaims
GetClaims retrieves claims from the context with type safety using generics. This provides compile-time type checking and eliminates the need for manu
middleware.go:173
Function
GetClaims
GetClaims retrieves claims from the context with type safety using generics. This is a type-safe alternative to manually type-asserting the claims fr
core/context.go:29
Function
GetClaims
GetClaims retrieves claims from the context with type safety using generics. This is a type-safe alternative to manually type-asserting the claims fr
integrations/grpc/claims.go:21
Method
GetConfirmationJKT
()
core/dpop_test.go:39
Method
GetHTM
()
core/dpop_test.go:58
Method
GetHTU
()
core/dpop_test.go:59
Method
GetIAT
()
core/dpop_test.go:60
Method
GetJTI
()
core/dpop_test.go:57
Method
GetJTI
GetJTI returns the unique identifier (jti) of the DPoP proof.
core/dpop.go:96
Method
GetMessage
()
examples/grpc-example/proto/greeter.pb.go:113
Method
GetPublicKey
()
core/dpop_test.go:62
Method
GetPublicKeyThumbprint
()
core/dpop_test.go:61
Method
GetStatus
()
examples/grpc-example/proto/greeter.pb.go:207
Method
HasConfirmation
()
core/dpop_test.go:43
Method
HealthCheck
(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption)
examples/grpc-example/proto/greeter_grpc.pb.go:48
Method
HealthCheck
Health check (no authentication required)
examples/grpc-example/proto/greeter_grpc.pb.go:64
Method
HealthCheck
(context.Context, *HealthCheckRequest)
examples/grpc-example/proto/greeter_grpc.pb.go:75
Method
HealthCheck
HealthCheck returns server status. No authentication required.
examples/grpc-example/server/main.go:52
← previous
next →
201–300 of 744, ranked by callers