oautherror

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package oautherror provides OAuth response diagnostics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseError

type ResponseError struct {
	// contains filtered or unexported fields
}

ResponseError preserves an upstream OAuth error response while exposing parsed fields for refresh-failure classification.

func NewResponseError

func NewResponseError(statusCode int, body []byte) *ResponseError

NewResponseError extracts diagnostics from an OAuth error response.

func (*ResponseError) Code

func (e *ResponseError) Code() string

Code returns the provider error code.

func (*ResponseError) Detail

func (e *ResponseError) Detail() string

Detail returns the provider detail.

func (*ResponseError) Diagnostic

func (e *ResponseError) Diagnostic() string

Diagnostic returns a summary assembled only from known OAuth response fields. Callers must still redact and bound field values before logging it.

func (*ResponseError) Error

func (e *ResponseError) Error() string

Error returns the upstream response body unchanged.

func (*ResponseError) ErrorDescription

func (e *ResponseError) ErrorDescription() string

ErrorDescription returns the OAuth error description.

func (*ResponseError) Message

func (e *ResponseError) Message() string

Message returns the provider message.

func (*ResponseError) OAuthError

func (e *ResponseError) OAuthError() string

OAuthError returns the OAuth error identifier.

func (*ResponseError) ResponseBody

func (e *ResponseError) ResponseBody() []byte

ResponseBody returns a copy of the upstream HTTP response body.

func (*ResponseError) StatusCode

func (e *ResponseError) StatusCode() int

StatusCode returns the upstream HTTP response status.

Jump to

Keyboard shortcuts

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