Expand description
OAuth 2.0 API Endpoints
Handles OAuth 2.0 authorization code flow (RFC 6749), token exchange, token revocation (RFC 7009), and client metadata retrieval.
Re-exports§
pub use crate::oauth2_server::AuthorizationRequest as AuthorizeRequest;pub use crate::oauth2_server::TokenRequest;pub use crate::oauth2_server::TokenResponse;
Structs§
- Client
Info - Registered OAuth 2.0 client metadata.
- Client
Registration Request - Dynamic client registration request per RFC 7591.
- EndSession
Request - Request parameters for OpenID Connect RP-Initiated Logout.
- OAuth
Error - OAuth error response per RFC 6749 §5.2.
- Revoke
Request - OAuth 2.0 token revocation request per RFC 7009.
- User
Info Response - OpenID Connect UserInfo response.
Functions§
- authorize
- GET /oauth/authorize OAuth 2.0 authorization endpoint — validates the client and redirect_uri, generates an authorization code, and redirects the user-agent back to the client (RFC 6749 §4.1.2).
- end_
session - OIDC RP-Initiated Logout (OpenID Connect RP-Initiated Logout 1.0).
- get_
client_ info - GET /oauth/clients/{client_id} — return the stored metadata for a registered OAuth 2.0 client.
- jwks
- JSON Web Key Set (JWKS) endpoint (RFC 7517).
- openid_
configuration - OpenID Connect Discovery endpoint (RFC 8414 / OpenID Connect Discovery 1.0).
- register_
client - POST /oauth/register — dynamically register a new OAuth 2.0 client (RFC 7591).
- revoke
- POST /api/v1/oauth/revoke — revoke an access or refresh token.
- token
- POST /oauth/token — exchange an authorization code or refresh token for an access token (RFC 6749 §4.1.3, §6).
- userinfo
- GET /api/v1/oauth/userinfo — return claims about the authenticated user.
- users_
me - GET /users/me — returns the authenticated user’s profile.