Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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.
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token will generate and verify based on what is defined in the config.
func NewToken ¶
func NewToken(name env.Name, cfg *Config, fs *os.FS, sig *ed25519.Signer, ver *ed25519.Verifier, gen id.Generator) *Token
NewToken based on config.
Click to show internal directories.
Click to hide internal directories.