Documentation
¶
Index ¶
- Constants
- Variables
- func CallbackWindow(moreTime bool) time.Duration
- func HashState(state string) string
- func RandomState() (string, error)
- func S256Challenge(verifier string) string
- func SafeProviderError(code string, fields map[string]string) error
- func ValidPKCEVerifier(verifier string) bool
- type ProviderError
Constants ¶
View Source
const DefaultCallbackWindow = 10 * time.Minute
View Source
const PKCES256 = "S256"
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 CallbackWindow ¶
CallbackWindow returns the Core deadline window selected before provider authorization.
func RandomState ¶
RandomState returns a cryptographically random browser-safe OAuth state.
func S256Challenge ¶
func SafeProviderError ¶
SafeProviderError maps provider response fields to a credential-safe error.
func ValidPKCEVerifier ¶
Types ¶
type ProviderError ¶
func (ProviderError) Error ¶
func (e ProviderError) Error() string
Click to show internal directories.
Click to hide internal directories.