authn

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthenticated    = status.Error(codes.Code(openfgav1.AuthErrorCode_unauthenticated), "unauthenticated")
	ErrMissingBearerToken = status.Error(codes.Code(openfgav1.AuthErrorCode_bearer_token_missing), "missing bearer token")
)

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	// Authenticate returns a nil error and the AuthClaims info (if available) if the subject is authenticated or a
	// non-nil error with an appropriate error cause otherwise.
	Authenticate(requestContext context.Context) (*authclaims.AuthClaims, error)
	// Close Cleans up the authenticator.
	Close()
}

type NoopAuthenticator

type NoopAuthenticator struct{}

func (NoopAuthenticator) Authenticate

func (n NoopAuthenticator) Authenticate(requestContext context.Context) (*authclaims.AuthClaims, error)

func (NoopAuthenticator) Close

func (n NoopAuthenticator) Close()

type OIDCAuthenticator

type OIDCAuthenticator interface {
	GetConfiguration() (*OidcConfig, error)
	GetKeys() (*keyfunc.JWKS, error)
}

type OidcConfig

type OidcConfig struct {
	Issuer  string `json:"issuer"`
	JWKsURI string `json:"jwks_uri"`
}

OidcConfig contains authorization server metadata. See https://datatracker.ietf.org/doc/html/rfc8414#section-2

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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