Documentation
¶
Index ¶
- func NewError(err, description string) error
- func NewErrorStatusCode(err, description string, statusCode int) error
- func NewErrorWithErrorResponse(resp ErrorResponse) error
- type AuthorizationRequest
- func (r AuthorizationRequest) ClientID() string
- func (r AuthorizationRequest) CodeChallenge() string
- func (r AuthorizationRequest) CodeChallengeMethod() string
- func (r AuthorizationRequest) ColorScheme() string
- func (r AuthorizationRequest) CustomUIQuery() string
- func (r AuthorizationRequest) HasMaxAge() bool
- func (r AuthorizationRequest) IDTokenHint() (string, bool)
- func (r AuthorizationRequest) LoginHint() (string, bool)
- func (r AuthorizationRequest) MaxAge() (duration time.Duration, ok bool)
- func (r AuthorizationRequest) Nonce() string
- func (r AuthorizationRequest) OAuthProviderAlias() string
- func (r AuthorizationRequest) Page() string
- func (r AuthorizationRequest) Platform() string
- func (r AuthorizationRequest) Prompt() []string
- func (r AuthorizationRequest) RedirectURI() string
- func (r AuthorizationRequest) ResponseMode() string
- func (r AuthorizationRequest) ResponseType() string
- func (r AuthorizationRequest) SSOEnabled() bool
- func (r AuthorizationRequest) Scope() []string
- func (r AuthorizationRequest) State() string
- func (r AuthorizationRequest) SuppressIDPSessionCookie() bool
- func (r AuthorizationRequest) UILocales() []string
- func (r AuthorizationRequest) WeChatRedirectURI() string
- type AuthorizationResponse
- type ErrorResponse
- type OAuthProtocolError
- type RevokeRequest
- type TokenRequest
- func (r TokenRequest) ClientID() string
- func (r TokenRequest) ClientSecret() string
- func (r TokenRequest) Code() string
- func (r TokenRequest) CodeVerifier() string
- func (r TokenRequest) DeviceInfo() (map[string]interface{}, error)
- func (r TokenRequest) GrantType() string
- func (r TokenRequest) JWT() string
- func (r TokenRequest) RedirectURI() string
- func (r TokenRequest) RefreshToken() string
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorStatusCode ¶
func NewErrorWithErrorResponse ¶
func NewErrorWithErrorResponse(resp ErrorResponse) error
Types ¶
type AuthorizationRequest ¶
func (AuthorizationRequest) CodeChallenge ¶
func (r AuthorizationRequest) CodeChallenge() string
PKCE extension
func (AuthorizationRequest) CodeChallengeMethod ¶
func (r AuthorizationRequest) CodeChallengeMethod() string
func (AuthorizationRequest) ColorScheme ¶
func (r AuthorizationRequest) ColorScheme() string
func (AuthorizationRequest) CustomUIQuery ¶
func (r AuthorizationRequest) CustomUIQuery() string
func (AuthorizationRequest) HasMaxAge ¶
func (r AuthorizationRequest) HasMaxAge() bool
func (AuthorizationRequest) IDTokenHint ¶
func (r AuthorizationRequest) IDTokenHint() (string, bool)
func (AuthorizationRequest) LoginHint ¶
func (r AuthorizationRequest) LoginHint() (string, bool)
func (AuthorizationRequest) MaxAge ¶
func (r AuthorizationRequest) MaxAge() (duration time.Duration, ok bool)
func (AuthorizationRequest) Nonce ¶
func (r AuthorizationRequest) Nonce() string
func (AuthorizationRequest) OAuthProviderAlias ¶
func (r AuthorizationRequest) OAuthProviderAlias() string
func (AuthorizationRequest) Page ¶
func (r AuthorizationRequest) Page() string
func (AuthorizationRequest) RedirectURI ¶
func (r AuthorizationRequest) RedirectURI() string
func (AuthorizationRequest) ResponseMode ¶
func (r AuthorizationRequest) ResponseMode() string
func (AuthorizationRequest) ResponseType ¶
func (r AuthorizationRequest) ResponseType() string
func (AuthorizationRequest) SSOEnabled ¶
func (r AuthorizationRequest) SSOEnabled() bool
func (AuthorizationRequest) Scope ¶
func (r AuthorizationRequest) Scope() []string
func (AuthorizationRequest) State ¶
func (r AuthorizationRequest) State() string
func (AuthorizationRequest) SuppressIDPSessionCookie ¶
func (r AuthorizationRequest) SuppressIDPSessionCookie() bool
func (AuthorizationRequest) UILocales ¶
func (r AuthorizationRequest) UILocales() []string
func (AuthorizationRequest) WeChatRedirectURI ¶
func (r AuthorizationRequest) WeChatRedirectURI() string
type AuthorizationResponse ¶
func (AuthorizationResponse) Code ¶
func (r AuthorizationResponse) Code(v string)
func (AuthorizationResponse) State ¶
func (r AuthorizationResponse) State(v string)
type ErrorResponse ¶
func NewErrorResponse ¶
func NewErrorResponse(err, description string) ErrorResponse
func (ErrorResponse) Error ¶
func (r ErrorResponse) Error(v string)
func (ErrorResponse) ErrorDescription ¶
func (r ErrorResponse) ErrorDescription(v string)
func (ErrorResponse) State ¶
func (r ErrorResponse) State(v string)
func (ErrorResponse) ToWWWAuthenticateHeader ¶
func (r ErrorResponse) ToWWWAuthenticateHeader() string
ToWWWAuthenticateHeader transform OAuth error response into a value for HTTP WWW-Authenticate header. Note that the caller should ensure the response keys & values do not require escaping.
type OAuthProtocolError ¶
type OAuthProtocolError struct { StatusCode int Response ErrorResponse }
func (*OAuthProtocolError) Error ¶
func (e *OAuthProtocolError) Error() string
type RevokeRequest ¶
func (RevokeRequest) Token ¶
func (r RevokeRequest) Token() string
func (RevokeRequest) TokenTypeHint ¶
func (r RevokeRequest) TokenTypeHint() string
type TokenRequest ¶
func (TokenRequest) ClientID ¶
func (r TokenRequest) ClientID() string
func (TokenRequest) ClientSecret ¶
func (r TokenRequest) ClientSecret() string
func (TokenRequest) Code ¶
func (r TokenRequest) Code() string
func (TokenRequest) CodeVerifier ¶
func (r TokenRequest) CodeVerifier() string
func (TokenRequest) DeviceInfo ¶
func (r TokenRequest) DeviceInfo() (map[string]interface{}, error)
Proprietary
func (TokenRequest) GrantType ¶
func (r TokenRequest) GrantType() string
func (TokenRequest) JWT ¶
func (r TokenRequest) JWT() string
func (TokenRequest) RedirectURI ¶
func (r TokenRequest) RedirectURI() string
func (TokenRequest) RefreshToken ¶
func (r TokenRequest) RefreshToken() string
type TokenResponse ¶
type TokenResponse map[string]interface{}
func (TokenResponse) AccessToken ¶
func (r TokenResponse) AccessToken(v string)
func (TokenResponse) ExpiresIn ¶
func (r TokenResponse) ExpiresIn(v int)
func (TokenResponse) IDToken ¶
func (r TokenResponse) IDToken(v string)
func (TokenResponse) RefreshToken ¶
func (r TokenResponse) RefreshToken(v string)
func (TokenResponse) Scope ¶
func (r TokenResponse) Scope(v string)
func (TokenResponse) TokenType ¶
func (r TokenResponse) TokenType(v string)
Click to show internal directories.
Click to hide internal directories.