Documentation ¶
Index ¶
- type APIError
- type Mailgun
- type Service
- func (s Service) IssueAccessToken(ctx context.Context, grant grants.Grant) (string, error)
- func (s Service) IssueRefreshToken(ctx context.Context, grant grants.Grant) (string, error)
- func (s Service) Server(prefix string) http.Handler
- func (s Service) UseRefreshToken(ctx context.Context, tokenID string) error
- func (s Service) ValidateRefreshToken(ctx context.Context, token, client string) (tokens.RefreshToken, error)
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mailgun ¶
type Service ¶
type Service struct { GoogleIDVerifier *oidc.IDTokenVerifier GoogleClients []string TokenExpiresIn int Accounts accounts.Dependencies Clients clients.Storer Grants grants.Dependencies Refresh tokens.Dependencies Scopes scopes.Dependencies Sessions sessions.Dependencies Log *yall.Logger Emailer emailer }
func (Service) IssueAccessToken ¶
IssueAccessToken creates a new access token from a Grant, filling in the values appropriately.
func (Service) IssueRefreshToken ¶
IssueRefreshToken creates a Refresh Token and stores it in the service indicated by `Refresh` on `s`. It fills the token with the appropriate values from `grant`, sets any unset defaults, and stores the token before returning it.
func (Service) UseRefreshToken ¶
UseRefreshToken marks a refresh token as used, making it so the token cannot be reused.
func (Service) ValidateRefreshToken ¶
func (s Service) ValidateRefreshToken(ctx context.Context, token, client string) (tokens.RefreshToken, error)
ValidateRefreshToken verifies that a refresh token is valid and for the specified client, returning the struct representation of valid tokens.
Click to show internal directories.
Click to hide internal directories.