Module errors

Module errors 

Source
Expand description

OAuth2 errors for gate::oauth2.

These error types model failures that can occur while configuring or executing the OAuth2 Authorization Code + PKCE flow within OAuth2Gate.

Design goals:

  • Provide a small, expressive enum for all OAuth2-related failures
  • Keep messages safe for end users; avoid leaking sensitive details
  • Include deterministic support codes per variant for service/support workflows
  • Avoid hard dependencies on specific HTTP clients; store messages instead of foreign errors

Integration:

  • The enum implements crate::errors::UserFriendlyError for consistent messaging
  • A local Result<T> alias is provided for gate-internal use
  • The crate-level integration (e.g., adding a new top-level variant in crate::errors::Error) can be done separately if/when you want to surface OAuth2 errors consistently across the crate.

Enums§

OAuth2CookieKind
OAuth2 cookie kinds used in validation errors.
OAuth2Error
OAuth2-specific error type for OAuth2Gate.

Type Aliases§

Result
Local Result alias for OAuth2 flows.