oauth_error

package
v0.0.0-...-049ef2a Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuthError

type OAuthError struct {
	Type        OAuthErrorType
	Description string
	URI         string
}

func NewOAuthDetailedError

func NewOAuthDetailedError(typeName OAuthErrorType, description, uri string) *OAuthError

func NewOAuthError

func NewOAuthError(typeName OAuthErrorType, description string) *OAuthError

func NewOAuthSimpleError

func NewOAuthSimpleError(typeName OAuthErrorType) *OAuthError

func (*OAuthError) Error

func (e *OAuthError) Error() string

func (*OAuthError) Header

func (e *OAuthError) Header(realm string) string

func (*OAuthError) JSON

func (e *OAuthError) JSON() []byte

func (*OAuthError) Query

func (e *OAuthError) Query(state string) string

func (*OAuthError) StatusCode

func (e *OAuthError) StatusCode() int

type OAuthErrorJSON

type OAuthErrorJSON struct {
	Type        string `json:"error"`
	Description string `json:"error_description,omitempty"`
	URI         string `json:"error_uri,omitempty"`
}

type OAuthErrorQuery

type OAuthErrorQuery struct {
	Type        string `url:"error"`
	Description string `url:"error_description,omitempty"`
	URI         string `url:"error_uri,omitempty"`
	State       string `url:"state,omitempty"`
}

type OAuthErrorType

type OAuthErrorType int
const (
	// RFC6749
	ErrAccessDenied OAuthErrorType = iota
	ErrInvalidClient
	ErrInvalidGrant
	ErrInvalidRequest
	ErrInvalidScope
	ErrUnauthorizedClient
	ErrUnsupportedGrantType
	ErrUnsupportedResponseType
	ErrServerError
	ErrTemporarilyUnavailable
	// RFC6750
	ErrInvalidToken
	ErrInsufficientScope
	// OpenID Core 3.1.2.6 Authentication Error Response
	ErrInteractionRequired
	ErrLoginRequired
	ErrAccountSelectionRequired
	ErrConsentRequired
	ErrInvalidRequestURI
	ErrInvalidRequestObject
	ErrRequestNotSupported
	ErrRequestURINotSupported
	ErrRegistrationNotSupported
)

func (OAuthErrorType) String

func (t OAuthErrorType) String() string

type OAuthErrorURIBuilder

type OAuthErrorURIBuilder func(OAuthErrorType) string

Jump to

Keyboard shortcuts

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