Documentation ¶
Index ¶
- type ErrorResponse
- type HttpClientFactory
- type OauthClient
- func (c *OauthClient) AuthorizationCode(appID string, code_verifier string, code string, redirect_uri string, ...) (*TokenResponse, *ErrorResponse, error)
- func (c *OauthClient) ClientCredentials(appID string, scope string) (*TokenResponse, *ErrorResponse, error)
- func (c *OauthClient) RefreshToken(appID string, refreshToken string) (*TokenResponse, *ErrorResponse, error)
- func (c *OauthClient) ResourceOwner(appID string, scope string, owner string, ownerPassword string) (*TokenResponse, *ErrorResponse, error)
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type HttpClientFactory ¶
type OauthClient ¶
type OauthClient struct { Service string Client *http.Client Headers map[string]string ClientID string ClientSecret string SourceHeader string }
OauthClient represents a stateful Oauth client
func GetNewClient ¶
func GetNewClient(service string, httpFactory HttpClientFactory) (*OauthClient, error)
GetNewClient creates a new client for the specified endpoint
func GetNewConfidentialClient ¶
func GetNewConfidentialClient(service string, clientID string, clientSecret string, httpFactory HttpClientFactory) (*OauthClient, error)
GetNewConfidentialClient creates a new client for the specified endpoint
func (*OauthClient) AuthorizationCode ¶
func (c *OauthClient) AuthorizationCode(appID string, code_verifier string, code string, redirect_uri string, client_id string) (*TokenResponse, *ErrorResponse, error)
func (*OauthClient) ClientCredentials ¶
func (c *OauthClient) ClientCredentials(appID string, scope string) (*TokenResponse, *ErrorResponse, error)
func (*OauthClient) RefreshToken ¶
func (c *OauthClient) RefreshToken(appID string, refreshToken string) (*TokenResponse, *ErrorResponse, error)
func (*OauthClient) ResourceOwner ¶
func (c *OauthClient) ResourceOwner(appID string, scope string, owner string, ownerPassword string) (*TokenResponse, *ErrorResponse, error)
ResourceOwner implements the ResourceOwner flow
Click to show internal directories.
Click to hide internal directories.