package
0.0.0-20240611155925-ec252d0ef534
Repository: https://github.com/andrewhowdencom/x40.link.git
Documentation: pkg.go.dev

# Functions

NeedsPermission allows ensuring the validator guarantees a permission exists.
NewServerInterceptor is a convenience function that generates the JWT validation interceptors.
ServerInterceptorOptsFromViper resolves the global viper configuration into a series of options that can bootstrap a server interceptor.
WireServerInterceptor generates a server interceptor from the global DI container.
WithAddedPermissions sets the scopes directly on the oauth2 implementation.
WithJWKSKeyFunc allows fetching the key function from upstream.
WithKeyFunc supplies the function that supplies the key for validation.
WithParser allows configuring the parser.
WithStaticKey allows using an arbitrary static key to check for the token validity.

# Constants

AudienceX40API is the audience field required for the X40 API.
ClaimPermissions is how auth0 returns the roles that are requested (via scopes).

# Variables

Err* are sentinel errors.
Err* are sentinel errors.
Err* are sentinel errors.
Public* is the configuration for the public endpoints.
By default, quite a few of the JWT Claims are optional.

# Structs

ServerInterceptor is an interceptor that validates the JWT tokens supplied by the user.
X40 is a token extended with claims specific to this application.

# Type aliases

ServerInterceptorOptionFunc modifies the behavior of the oauth2 validator.