provider

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedProvider = errors.New("unsupported provider")

Functions

func Register

func Register(name string, newSigner func(ctx context.Context, key string) (Provider, error))

func Registered

func Registered() []string

Types

type Provider

type Provider interface {
	// Check checks the validity of the signer, returning an error if the signer
	// is invalid or misconfigured.
	Check() error

	// Sign signs the given claims and returns a JWT token string, as specified
	// by [jwt.Token.SignedString]
	Sign(claims jwt.Claims) (string, error)
}

func NewSigner

func NewSigner(ctx context.Context, provider, key string) (Provider, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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