token

package
v1.304.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("invalid token")

ErrInvalid for token.

Module for fx.

Functions

func IsEnabled

func IsEnabled(cfg *Config) bool

IsEnabled the config.

func NewVerifier

func NewVerifier(cfg *Config) token.Verifier

NewVerifier for konfig.

Types

type Config

type Config struct {
	Key string `yaml:"key,omitempty" json:"key,omitempty" toml:"key,omitempty"`
}

Config for token.

type Verifier

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

Verifier for konfig.

func (*Verifier) Verify

func (v *Verifier) Verify(ctx context.Context, token []byte) (context.Context, error)

// Verify a token or error.

Jump to

Keyboard shortcuts

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