Documentation ¶
Overview ¶
Package session provides a session manager for creating and verifying JWT tokens.
Index ¶
Constants ¶
View Source
const (
// SessionManagerClaimsIssuer fills the "iss" field of the token.
SessionManagerClaimsIssuer = "everest"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides functionality for creating and managing JWT tokens.
func (*Manager) Authenticate ¶
Authenticate verifies the given username and password.
func (*Manager) Create ¶
Create creates a new token for a given subject (user) and returns it as a string. Passing a value of `0` for secondsBeforeExpiry creates a token that never expires. The id parameter holds an optional unique JWT token identifier and stored as a standard claim "jti" in the JWT token.
Click to show internal directories.
Click to hide internal directories.