Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedToSignToken = credstackError.NewError(500, "ERR_FAILED_TO_SIGN", "token: Failed to sign token due to an internal error")
ErrFailedToSignToken - An error that gets wrapped when jwt.Token.SignedString returns an error
View Source
var ErrTokenCollision = credstackError.NewError(500, "ERR_TOKEN_COLLISION", "token: A duplicate access token was issued")
ErrTokenCollision - An error that gets returned when a duplicate access token is created. This should realistically never return as JWT access tokens are unique
Functions ¶
func NewToken ¶ added in v1.3.1
func NewToken(serv *server.Server, ticket *tokenModel.AuthenticationTicket, claims jwt.RegisteredClaims) (*tokenModel.TokenResponse, error)
NewToken - Generates a token according to the algorithm provided by the API passed as a parameter. Any tokens generated with this function are stored in the database, and are automatically converted to a token response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.