protocol

package
v0.0.0-...-ee57881 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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

func ParseUILocales

func ParseUILocales(s string) []string

Types

type AuthorizationRequest

type AuthorizationRequest map[string]string

func (AuthorizationRequest) AuthenticationFlowGroup

func (r AuthorizationRequest) AuthenticationFlowGroup() 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) DPoPJKT

func (r AuthorizationRequest) DPoPJKT() string

DPoP

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

func (r AuthorizationRequest) PreAuthenticatedURLToken() string

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

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

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

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

Jump to

Keyboard shortcuts

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