token

package
v0.0.0-...-4b35d5f Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issuer

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

Issuer issues tokens

func NewIssuer

func NewIssuer(issuer, certFile, keyFile string, opts ...Option) (*Issuer, error)

NewIssuer creates a new issuer

func (*Issuer) CreateToken

func (i *Issuer) CreateToken(audience, subject string, accessList []auth.Access) (string, error)

CreateToken issues a new token

type Option

type Option func(*Issuer)

Option is a functional option that configures an issuer

func WithTokenDuration

func WithTokenDuration(tokenDuration time.Duration) Option

WithTokenDuration sets the duration of tokens issued by the issuer

Jump to

Keyboard shortcuts

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