OAuth authorize endpoint (Authorization Code + PKCE)
Initiates the Authorization Code + PKCE flow: 1. Validates client_id exists and is enabled 2. Validates redirect_uri is in whitelist (exact match only) 3. Validates PKCE code_challenge_method (must be S256 if provided) 4. Stores state token with PKCE parameters in Redis (5 minutes TTL) 5. Redirects to login page with OAuth parameters # Arguments * `realm_id` - Realm identifier * `params` - OAuth query parameters (client_id, redirect_uri, state, response_type, code_challenge, code_challenge_method) # Returns * 302 redirect to login page with OAuth parameters # Errors * 400 - Invalid parameters (missing client_id, redirect_uri, state, or code_challenge) * 400 - Invalid response_type (must be "code") * 400 - Unsupported code_challenge_method (must be "S256") * 404 - Client not found or disabled * 400 - Redirect URI not in whitelist
Initiates the Authorization Code + PKCE flow:
- Validates client_id exists and is enabled
- Validates redirect_uri is in whitelist (exact match only)
- Validates PKCE code_challenge_method (must be S256 if provided)
- Stores state token with PKCE parameters in Redis (5 minutes TTL)
- Redirects to login page with OAuth parameters
Arguments
realm_id- Realm identifierparams- OAuth query parameters (client_id, redirect_uri, state, response_type, code_challenge, code_challenge_method)
Returns
- 302 redirect to login page with OAuth parameters
Errors
- 400 - Invalid parameters (missing client_id, redirect_uri, state, or code_challenge)
- 400 - Invalid response_type (must be "code")
- 400 - Unsupported code_challenge_method (must be "S256")
- 404 - Client not found or disabled
- 400 - Redirect URI not in whitelist
Path Parameters
Realm ID
Query Parameters
OAuth Client ID
Redirect URI (must be in whitelist, exact match)
State token (CSRF protection)
Response type (must be 'code')
PKCE code challenge (SHA256 + Base64url)
PKCE method (must be 'S256' if provided, defaults to S256)
Response Body
application/json
application/json
curl -X GET "https://example.com/api/oauth/string/authorize?client_id=string&redirect_uri=string&state=string&response_type=string&code_challenge=string"{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}