Documentation ¶
Overview ¶
Package oauthtest provides mocking to test oauth package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenAdapter ¶
type TokenAdapter struct { AccessToken string ClientID string ClientSecret string Scope string CustomValues map[string][]string }
A TokenAdapter is an implementation of TokenAdapter interface for testing purposes.
func NewTokenAdapter ¶
func NewTokenAdapter() *TokenAdapter
NewTokenAdapter creates a new instance of TokenAdapter.
func (*TokenAdapter) FindClient ¶
func (a *TokenAdapter) FindClient(c *oauth.TokenContext) *oauth.ClientEntry
FindClient gets the client information if valid.
func (*TokenAdapter) NewAccessToken ¶
func (a *TokenAdapter) NewAccessToken(c *oauth.TokenContext) *oauth.TokenResponse
NewAccessToken creates and returns a new access token.
func (*TokenAdapter) ValidateRefresh ¶
func (a *TokenAdapter) ValidateRefresh(*oauth.TokenContext) bool
ValidateRefresh validate provided refresh token.
func (*TokenAdapter) ValidateUser ¶
func (a *TokenAdapter) ValidateUser(*oauth.TokenContext) bool
ValidateUser validate resource owner credentials for password grant type.
Click to show internal directories.
Click to hide internal directories.