token

package
v1.273.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	// Generate a new token or error.
	Generate(ctx context.Context) (context.Context, []byte, error)
}

Generator allows the implementation of different types generators.

type NoopTokenizer added in v1.273.0

type NoopTokenizer struct{}

NoopTokenizer for token.

func (*NoopTokenizer) Generate added in v1.273.0

func (*NoopTokenizer) Generate(ctx context.Context) (context.Context, []byte, error)

func (*NoopTokenizer) GenerateConfig added in v1.273.0

func (*NoopTokenizer) GenerateConfig() (string, string, error)

func (*NoopTokenizer) Verify added in v1.273.0

func (*NoopTokenizer) Verify(ctx context.Context, _ []byte) (context.Context, error)

type Tokenizer added in v1.204.0

type Tokenizer interface {
	Generator
	Verifier

	// GenerateConfig to be used by the Tokenizer.
	GenerateConfig() (string, string, error)
}

Tokenizer will generate and verify.

type Verifier

type Verifier interface {
	// Verify a token or error.
	Verify(ctx context.Context, token []byte) (context.Context, error)
}

Verifier allows the implementation of different types of verifiers.

Jump to

Keyboard shortcuts

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