protocol

package
v0.0.0-...-2b8ec9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(err, description string) error

func NewErrorStatusCode

func NewErrorStatusCode(err, description string, statusCode int) error

func NewErrorWithErrorResponse

func NewErrorWithErrorResponse(resp ErrorResponse) error

Types

type AuthorizationRequest

type AuthorizationRequest map[string]string

func (AuthorizationRequest) ClientID

func (r AuthorizationRequest) ClientID() string

OAuth 2.0

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) Platform

func (r AuthorizationRequest) Platform() string

Proprietary

func (AuthorizationRequest) Prompt

func (r AuthorizationRequest) Prompt() []string

OIDC extension

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

type AuthorizationResponse map[string]string

func (AuthorizationResponse) Code

func (r AuthorizationResponse) Code(v string)

func (AuthorizationResponse) State

func (r AuthorizationResponse) State(v string)

type ErrorResponse

type ErrorResponse map[string]string

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

type RevokeRequest map[string]string

func (RevokeRequest) Token

func (r RevokeRequest) Token() string

func (RevokeRequest) TokenTypeHint

func (r RevokeRequest) TokenTypeHint() string

type TokenRequest

type TokenRequest map[string]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) 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL