Documentation ¶
Index ¶
- func NewError(err, description string) error
- func NewErrorStatusCode(err, description string, statusCode int) error
- func NewErrorWithErrorResponse(resp ErrorResponse) error
- func ParseUILocales(s string) []string
- type AuthorizationRequest
- func (r AuthorizationRequest) AuthenticationFlowGroup() string
- func (r AuthorizationRequest) ClientID() string
- func (r AuthorizationRequest) CodeChallenge() string
- func (r AuthorizationRequest) CodeChallengeMethod() string
- func (r AuthorizationRequest) ColorScheme() string
- func (r AuthorizationRequest) DPoPJKT() 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) PreAuthenticatedURLToken() string
- func (r AuthorizationRequest) Prompt() []string
- func (r AuthorizationRequest) RedirectURI() string
- func (r AuthorizationRequest) ResponseMode() string
- func (r AuthorizationRequest) ResponseType() ResponseType
- func (r AuthorizationRequest) SSOEnabled() bool
- func (r AuthorizationRequest) Scope() []string
- func (r AuthorizationRequest) SettingsAction() string
- func (r AuthorizationRequest) State() string
- func (r AuthorizationRequest) SuppressIDPSessionCookie() bool
- func (r AuthorizationRequest) UILocales() []string
- func (r AuthorizationRequest) UILocalesRaw() string
- func (r AuthorizationRequest) WeChatRedirectURI() string
- func (r AuthorizationRequest) XState() string
- type AuthorizationResponse
- type ErrorResponse
- type OAuthProtocolError
- type ResponseType
- type RevokeRequest
- type TokenRequest
- func (r TokenRequest) ActorToken() string
- func (r TokenRequest) ActorTokenType() string
- func (r TokenRequest) App2AppDeviceKeyJWT() string
- func (r TokenRequest) Audience() string
- func (r TokenRequest) ClientID() string
- func (r TokenRequest) ClientSecret() string
- func (r TokenRequest) Code() string
- func (r TokenRequest) CodeChallenge() string
- func (r TokenRequest) CodeChallengeMethod() string
- func (r TokenRequest) CodeVerifier() string
- func (r TokenRequest) DeviceInfo() (map[string]interface{}, error)
- func (r TokenRequest) DeviceSecret() string
- func (r TokenRequest) GrantType() string
- func (r TokenRequest) JWT() string
- func (r TokenRequest) RedirectURI() string
- func (r TokenRequest) RefreshToken() string
- func (r TokenRequest) RequestedTokenType() string
- func (r TokenRequest) Scope() []string
- func (r TokenRequest) SubjectToken() string
- func (r TokenRequest) SubjectTokenType() string
- type TokenResponse
- func (r TokenResponse) AccessToken(v string)
- func (r TokenResponse) Code(v string)
- func (r TokenResponse) DeviceSecret(v string)
- func (r TokenResponse) ExpiresIn(v int)
- func (r TokenResponse) IDToken(v string)
- func (r TokenResponse) IssuedTokenType(v string)
- func (r TokenResponse) RefreshToken(v string)
- func (r TokenResponse) Scope(v string)
- func (r TokenResponse) TokenType(v string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrorStatusCode ¶
func NewErrorWithErrorResponse ¶
func NewErrorWithErrorResponse(resp ErrorResponse) error
func ParseUILocales ¶
Types ¶
type AuthorizationRequest ¶
func (AuthorizationRequest) AuthenticationFlowGroup ¶
func (r AuthorizationRequest) AuthenticationFlowGroup() string
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) 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) PreAuthenticatedURLToken ¶
func (r AuthorizationRequest) PreAuthenticatedURLToken() string
func (AuthorizationRequest) RedirectURI ¶
func (r AuthorizationRequest) RedirectURI() string
func (AuthorizationRequest) ResponseMode ¶
func (r AuthorizationRequest) ResponseMode() string
func (AuthorizationRequest) ResponseType ¶
func (r AuthorizationRequest) ResponseType() ResponseType
func (AuthorizationRequest) SSOEnabled ¶
func (r AuthorizationRequest) SSOEnabled() bool
func (AuthorizationRequest) Scope ¶
func (r AuthorizationRequest) Scope() []string
func (AuthorizationRequest) SettingsAction ¶
func (r AuthorizationRequest) SettingsAction() 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) UILocalesRaw ¶
func (r AuthorizationRequest) UILocalesRaw() string
func (AuthorizationRequest) WeChatRedirectURI ¶
func (r AuthorizationRequest) WeChatRedirectURI() string
func (AuthorizationRequest) XState ¶
func (r AuthorizationRequest) XState() string
A custom state that will be passed to the custom ui
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
func (*OAuthProtocolError) Type ¶
func (e *OAuthProtocolError) Type() string
type ResponseType ¶
type ResponseType struct { Raw string // contains filtered or unexported fields }
func NewResponseType ¶
func NewResponseType(responseTypes []string) ResponseType
func ParseResponseType ¶
func ParseResponseType(str string) ResponseType
func (ResponseType) Equal ¶
func (rt ResponseType) Equal(other ResponseType) bool
type RevokeRequest ¶
func (RevokeRequest) Token ¶
func (r RevokeRequest) Token() string
func (RevokeRequest) TokenTypeHint ¶
func (r RevokeRequest) TokenTypeHint() string
type TokenRequest ¶
func (TokenRequest) ActorToken ¶
func (r TokenRequest) ActorToken() string
func (TokenRequest) ActorTokenType ¶
func (r TokenRequest) ActorTokenType() string
func (TokenRequest) App2AppDeviceKeyJWT ¶
func (r TokenRequest) App2AppDeviceKeyJWT() string
func (TokenRequest) Audience ¶
func (r TokenRequest) Audience() string
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) CodeChallenge ¶
func (r TokenRequest) CodeChallenge() string
func (TokenRequest) CodeChallengeMethod ¶
func (r TokenRequest) CodeChallengeMethod() string
func (TokenRequest) CodeVerifier ¶
func (r TokenRequest) CodeVerifier() string
func (TokenRequest) DeviceInfo ¶
func (r TokenRequest) DeviceInfo() (map[string]interface{}, error)
Proprietary
func (TokenRequest) DeviceSecret ¶
func (r TokenRequest) DeviceSecret() string
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
func (TokenRequest) RequestedTokenType ¶
func (r TokenRequest) RequestedTokenType() string
func (TokenRequest) Scope ¶
func (r TokenRequest) Scope() []string
func (TokenRequest) SubjectToken ¶
func (r TokenRequest) SubjectToken() string
func (TokenRequest) SubjectTokenType ¶
func (r TokenRequest) SubjectTokenType() string
type TokenResponse ¶
type TokenResponse map[string]interface{}
func (TokenResponse) AccessToken ¶
func (r TokenResponse) AccessToken(v string)
func (TokenResponse) Code ¶
func (r TokenResponse) Code(v string)
func (TokenResponse) DeviceSecret ¶
func (r TokenResponse) DeviceSecret(v string)
func (TokenResponse) ExpiresIn ¶
func (r TokenResponse) ExpiresIn(v int)
func (TokenResponse) IDToken ¶
func (r TokenResponse) IDToken(v string)
func (TokenResponse) IssuedTokenType ¶
func (r TokenResponse) IssuedTokenType(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.