Skip to main content

Crate openauth_oauth_provider

Crate openauth_oauth_provider 

Source
Expand description

OAuth 2.1 and OpenID Connect provider support for OpenAuth.

This crate ports the server-side Better Auth oauth-provider behavior into idiomatic Rust. It is intentionally separate from openauth-oauth, which contains OAuth client and social-provider primitives.

Modules§

mcp

Structs§

ConsentGrantInput
Input for creating or updating an OAuth consent grant.
CreateOAuthClientInput
OAuthAccessToken
Stored opaque OAuth access token row.
OAuthClient
OAuth 2.0 Dynamic Client Registration payload/response.
OAuthConsent
Stored OAuth consent row.
OAuthProviderError
OAuth provider runtime error.
OAuthProviderOptions
User-facing OAuth provider plugin options.
OAuthProviderPlugin
OAuth provider extension returned by crate::oauth_provider.
OAuthRefreshToken
Stored OAuth refresh token row.
ResolvedOAuthProviderOptions
Fully resolved OAuth provider options after upstream-compatible defaults.
SchemaClient
Stored OAuth client row.
TokenResponse

Enums§

AuthorizeDecision
GrantType
Supported token endpoint grant types.
OAuthProviderConfigError
OAuth provider configuration errors.
SecretStorage
Storage strategy for OAuth provider secrets and tokens.
TokenEndpointAuthMethod
OAuth token endpoint client authentication method.

Constants§

OAUTH_ACCESS_TOKEN_MODEL
OAUTH_CLIENT_MODEL
OAUTH_CONSENT_MODEL
OAUTH_REFRESH_TOKEN_MODEL
VERSION
Current crate version.

Functions§

auth_server_metadata
check_oauth_client
create_client_credentials_token
decide_authorize
decode_refresh_token
delete_consent
find_consent
has_granted_scopes
oauth_provider
Build the OAuth provider extension.
oauth_provider_schema
Database schema contributions for the OAuth provider plugin.
oauth_to_schema
oidc_server_metadata
schema_to_oauth
store_client_secret
store_token
upsert_consent
verify_client_secret