Documentation ¶
Overview ¶
Package backend implements the backend of the token server of API v0.
Index ¶
- func RefreshRequiresRenew(claim jwt.Claim) bool
- type Backend
- func (backend Backend) Authenticate(token string) (jwt.Claim, jwt.Error)
- func (backend Backend) AuthenticateMail(token string) (jwt.Claim, jwt.Error)
- func (backend Backend) AuthenticateRefresh(token string) (jwt.Claim, jwt.Error)
- func (backend Backend) IssueAccess(sub, scope string) (string, error)
- func (backend Backend) IssueMail(sub string) (string, error)
- func (backend Backend) IssueRefresh(sub, scope string) (string, error)
- func (backend Backend) IssueTmpUserAccess(sub string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RefreshRequiresRenew ¶
RefreshRequiresRenew returns a bool telling the refresh token is required to renew.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is a structure to hold the context of the token backend.
func (Backend) Authenticate ¶
Authenticate returns a claim authenticated with the given access token.
func (Backend) AuthenticateMail ¶
AuthenticateMail returns a claim authenticated with the given token embedded in an email.
func (Backend) AuthenticateRefresh ¶
AuthenticateRefresh returns a claim authenticated with the given refresh token.
func (Backend) IssueAccess ¶
IssueAccess returns an access token.
func (Backend) IssueRefresh ¶
IssueRefresh returns a refresh token.
Click to show internal directories.
Click to hide internal directories.