Documentation ¶
Index ¶
- Constants
- func ConfigExchangeCode(oa *oauth2.Config, ctx context.Context, httpcli *http.Client, code string) (*http.Client, errors.Error)
- func ConfigGetAuthCodeUrl(oa *oauth2.Config, state string, online bool) string
- func IsCodeError() bool
- func NewClientFromToken(ctx context.Context, httpcli *http.Client, tokenOAuth string) *http.Client
- func NewClientFromTokenSource(ctx context.Context, httpcli *http.Client, token oauth2.TokenSource) *http.Client
- func NewConfigOAuth(clientID, clientSecret, endpointToken, endpointAuth, redirectUrl string, ...) *oauth2.Config
Constants ¶
View Source
const ( ErrorEmptyParams errors.CodeError = iota + errors.MinPkgOAuth ErrorOAuthExchange )
Variables ¶
This section is empty.
Functions ¶
func ConfigExchangeCode ¶
func ConfigGetAuthCodeUrl ¶
ConfigGetAuthCodeUrl returns a URL to OAuth 2.0 provider's consent page that asks for permissions for the required scopes explicitly.
State is a token to protect the user from CSRF attacks. You must always provide a non-empty string and validate that it matches the the state query parameter on your redirect callback. See http://tools.ietf.org/html/rfc6749#section-10.12 for more info.
online may include true for AccessTypeOnline or false for AccessTypeOffline, as well as ApprovalForce.
func IsCodeError ¶
func IsCodeError() bool
func NewClientFromToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.