Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidKind for generation of tokens. ErrInvalidKind = errors.New("invalid kind") // ErrInvalidAlgorithm for service. ErrInvalidAlgorithm = errors.New("invalid algorithm") // ErrInvalidIssuer for service. ErrInvalidIssuer = errors.New("invalid issuer") // ErrInvalidTime for service. ErrInvalidTime = errors.New("invalid time") )
View Source
var Module = fx.Options( fx.Provide(NewJWT), fx.Provide(NewPaseto), fx.Provide(NewBranca), fx.Provide(NewService), )
Module for fx.
Functions ¶
This section is empty.
Types ¶
type Branca ¶ added in v1.10.3
type Branca struct {
// contains filtered or unexported fields
}
Branca service to generate tokens.
type BrancaToken ¶ added in v1.11.0
type BrancaToken struct { Subject string `json:"sub"` Audience string `json:"aud"` Issuer string `json:"iss"` }
BrancaToken for service.
type JWT ¶ added in v1.10.3
type JWT struct {
// contains filtered or unexported fields
}
JWT service.
func NewJWT ¶ added in v1.10.3
func NewJWT(publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey) *JWT
NewJWT service.
type Paseto ¶ added in v1.10.3
type Paseto struct {
// contains filtered or unexported fields
}
Paseto service.
func NewPaseto ¶ added in v1.10.3
func NewPaseto(publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey) *Paseto
NewPaseto service.
Click to show internal directories.
Click to hide internal directories.