Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultIssuer ¶ added in v0.4.0
type DefaultIssuer struct {
// contains filtered or unexported fields
}
DefaultIssuer handles JWT issuing
func NewDefaultIssuer ¶ added in v0.4.0
func NewDefaultIssuer(privateKey []byte) (*DefaultIssuer, error)
NewDefaultIssuer creates a new issuer by parsing the given path as an ED25519 private key
func (*DefaultIssuer) GenerateClaims ¶ added in v0.4.0
func (i *DefaultIssuer) GenerateClaims(jwtId string, userId string, expirationTime time.Time) *jwt.MapClaims
GenerateClaims generates a new claims object
func (*DefaultIssuer) IssueToken ¶ added in v0.4.0
func (i *DefaultIssuer) IssueToken(claims *jwt.MapClaims) (string, error)
IssueToken issues a new token for the given user with the given roles
type Logger ¶ added in v0.3.4
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶ added in v0.3.4
func NewLogger(logger commonlogger.Logger) Logger
NewLogger creates a new JWT issuer logger
func (Logger) IssuedToken ¶ added in v0.3.4
func (l Logger) IssuedToken()
IssuedToken logs a message when the server issues a token
Click to show internal directories.
Click to hide internal directories.