Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewOptions, New)
ProviderSet is a provider set for wire
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface { // NewToken serve caller new a json web token NewToken(id, name, picture, email string) (string, error) // ValidateToken serve caller to given signed token to validate token ValidateToken(signedToken string) (claims *TokenClaims, err error) }
Factory declare token factory functions
type Options ¶
type Options struct { Name string `json:"name" yaml:"name"` Signature string `json:"signature" yaml:"signature"` }
Options declare token's configuration
type TokenClaims ¶
type TokenClaims struct { ID string `json:"id"` Name string `json:"name"` Picture string `json:"picture"` Email string `json:"email"` jwt.StandardClaims }
TokenClaims declare custom claims
Click to show internal directories.
Click to hide internal directories.