Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = di.Module( access.Module, jwt.Module, paseto.Module, ssh.Module, di.Constructor(NewToken), di.Constructor(NewGenerator), di.Constructor(NewVerifier), )
Module for fx.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Access *access.Config `yaml:"access,omitempty" json:"access,omitempty" toml:"access,omitempty"`
JWT *jwt.Config `yaml:"jwt,omitempty" json:"jwt,omitempty" toml:"jwt,omitempty"`
Paseto *paseto.Config `yaml:"paseto,omitempty" json:"paseto,omitempty" toml:"paseto,omitempty"`
SSH *ssh.Config `yaml:"ssh,omitempty" json:"ssh,omitempty" toml:"ssh,omitempty"`
Kind string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
}
Config for token.
type Generator ¶
type Generator interface {
// Generate a new token or error.
Generate(aud, sub string) ([]byte, error)
}
Generator allows the implementation of different types generators.
func NewGenerator ¶ added in v2.34.0
NewGenerator for token.
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token will generate and verify based on what is defined in the config.
Click to show internal directories.
Click to hide internal directories.