jwt

package
v0.0.0-...-f0a7105 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthenticator

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

Types

type Authenticator

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

func (*Authenticator) Authenticate

func (jwt *Authenticator) Authenticate(ctx context.Context, contextType engine.ContextType) (*engine.AuthClaims, error)

func (*Authenticator) AuthenticateToken

func (jwt *Authenticator) AuthenticateToken(token string) (*engine.AuthClaims, error)

func (*Authenticator) Close

func (jwt *Authenticator) Close()

func (*Authenticator) CreateIdentity

func (jwt *Authenticator) CreateIdentity(claims engine.AuthClaims) (string, error)

func (*Authenticator) CreateIdentityWithContext

func (jwt *Authenticator) CreateIdentityWithContext(ctx context.Context, contextType engine.ContextType, claims engine.AuthClaims) (context.Context, error)

type Option

type Option func(d *Options)

func WithKey

func WithKey(key []byte) Option

WithKey set key

func WithSigningMethod

func WithSigningMethod(alg string) Option

WithSigningMethod set signing method

type Options

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

Jump to

Keyboard shortcuts

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