oauthflow

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOAuthStateInvalid  = xerror.New(xerror.KindInvalidInput, "OAUTH_STATE_INVALID", "oauth state invalid")
	ErrOAuthStateConsumed = xerror.New(xerror.KindInvalidInput, "OAUTH_STATE_CONSUMED", "oauth state consumed")
	ErrOAuthStateExpired  = xerror.New(xerror.KindInvalidInput, "OAUTH_STATE_EXPIRED", "oauth state expired")
)

Functions

func HashState

func HashState(state string) string

HashState returns a stable non-secret digest for a raw OAuth state value.

func RandomState

func RandomState() (string, error)

RandomState returns a cryptographically random browser-safe OAuth state.

func SafeProviderError

func SafeProviderError(code string, fields map[string]string) error

SafeProviderError maps provider response fields to a credential-safe error.

Types

type ProviderError

type ProviderError struct {
	Code    string
	Message string
}

func (ProviderError) Error

func (e ProviderError) Error() string

Jump to

Keyboard shortcuts

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