oauthflow

package
v0.2.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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