jwt

package
v0.0.0-...-96f2668 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticator

func NewAuthenticator(opts ...Option) (authn.Authenticator, error)

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(ctx context.Context) (*authn.AuthClaims, error)

func (*Authenticator) CreateIdentity

func (a *Authenticator) CreateIdentity(ctx context.Context, claims authn.AuthClaims) (string, error)

type Option

type Option func(*Authenticator)

func WithExpiresAt

func WithExpiresAt(d time.Duration) Option

func WithKeyFunc

func WithKeyFunc(k jwt.Keyfunc) Option

func WithParseContext

func WithParseContext(p ParseContextToken) Option

func WithSecretKey

func WithSecretKey(s string) Option

func WithSigMethod

func WithSigMethod(s string) Option

type ParseContextToken

type ParseContextToken func(context.Context) (string, error)

Jump to

Keyboard shortcuts

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