Module oauth2

Module oauth2 

Source
Expand description

OAuth2 Authorization Server Implementation

This module provides a complete OAuth2 authorization server with:

  • Authorization code flow with PKCE support
  • Storage-backed code validation and lifecycle management
  • Client credential validation
  • Token exchange with proper refresh token handling
  • Comprehensive error handling and security measures

Based on TUF-Laptop implementation with AuthFramework integration.

Structs§

AuthorizeRequest
OAuth2 authorization request parameters
AuthorizeResponse
OAuth2 authorization response
RevokeRequest
OAuth2 token revocation request
TokenRequest
OAuth2 token exchange request
TokenResponse
OAuth2 token response
UserInfoResponse
UserInfo response for OAuth2

Functions§

authorize
GET /api/v1/oauth2/authorize - Start OAuth2 authorization flow
revoke
POST /api/v1/oauth2/revoke - Revoke OAuth2 token
token
POST /api/v1/oauth2/token - OAuth2 token exchange
userinfo
GET /api/v1/oauth2/userinfo - OAuth2 UserInfo endpoint