serviceerr

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRequest          = newErr("", CodeInvalidRequest)
	ErrUnauthorizedClient      = newErr("", CodeUnauthorizedClient)
	ErrAccessDenied            = newErr("", CodeAccessDenied)
	ErrUnsupportedResponseType = newErr("", CodeUnsupportedResponseType)
	ErrInvalidScope            = newErr("", CodeInvalidScope)
	ErrServerError             = newErr("", CodeServerError)
	ErrTemporarilyUnavailable  = newErr("", CodeTemporarilyUnavailable)
)

Defined by RFC6749 https://www.rfc-editor.org/rfc/rfc6749.html#section-4.1.2.1 https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2.2.1

View Source
var (
	ErrInvalidClient        = newErr("", CodeInvalidClient)
	ErrInvalidGrant         = newErr("", CodeInvalidGrant)
	ErrUnsupportedGrantType = newErr("", CodeUnsupportedGrantType)
)

Defined by RFC6749 https://www.rfc-editor.org/rfc/rfc6749.html#section-5.2

View Source
var (
	ErrUnknown                = newErr("unknown error", CodeUnknown)
	ErrConflict               = newErr("already exists", CodeConflict)
	ErrNotFound               = newErr("not found", CodeNotFound)
	ErrFingerprintMismatch    = newErr("fingerprint mismatch", CodeFingerprintMismatch)
	ErrStateExpired           = newErr("state expired", CodeStateExpired)
	ErrInvalidOIDCProvider    = newErr("invalid OIDC provider", CodeInvalidOIDCProvider)
	ErrInvalidCSRFToken       = newErr("invalid CSRF token", CodeInvalidCSRFToken)
	ErrUnauthorized           = newErr("unauthorized", CodeUnauthorizedClient)
	ErrInvalidAtHash          = newErr("invalid atHash token", CodeInvalidAtHashToken)
	ErrEndSessionNotSupported = newErr("the provider does not support end session", CodeEndSessionNotSupported)
)

Custom defined

Functions

This section is empty.

Types

type Code added in v0.5.0

type Code string
const (
	CodeInvalidRequest          Code = "invalid_request"
	CodeUnauthorizedClient      Code = "unauthorized_client"
	CodeAccessDenied            Code = "access_denied"
	CodeUnsupportedResponseType Code = "unsupported_response_type"
	CodeInvalidScope            Code = "invalid_scope"
	CodeServerError             Code = "server_error"
	CodeTemporarilyUnavailable  Code = "temporarily_unavailable"
)

Defined by RFC6749 https://www.rfc-editor.org/rfc/rfc6749.html#section-4.1.2.1 https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2.2.1

const (
	CodeInvalidClient        Code = "invalid_client"
	CodeInvalidGrant         Code = "invalid_grant"
	CodeUnsupportedGrantType Code = "unsupported_grant_type"
)

Defined by RFC6749 https://www.rfc-editor.org/rfc/rfc6749.html#section-5.2

const (
	CodeUnknown                Code = "unknown"
	CodeConflict               Code = "conflict"
	CodeNotFound               Code = "not_found"
	CodeFingerprintMismatch    Code = "fingerprint_mismatch"
	CodeStateExpired           Code = "state_expired"
	CodeInvalidOIDCProvider    Code = "invalid_oidc_provider"
	CodeInvalidCSRFToken       Code = "invalid_csrf_token"
	CodeInvalidAtHashToken     Code = "invalid_at_hash_token"
	CodeEndSessionNotSupported Code = "end_session_not_supported"
)

Custom defined

type Error added in v0.5.0

type Error struct {
	Err         Code   `json:"error"`
	Description string `json:"error_description,omitempty"` // Optional
}

func (*Error) Error added in v0.5.0

func (e *Error) Error() string

func (Error) HTTPStatus added in v0.5.0

func (e Error) HTTPStatus() int

Jump to

Keyboard shortcuts

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