Authorization Endpoint

Authorization Endpoint

Endpoint:
GET /relid/authserver/oauth/authorize

Description:
Initiates the OAuth 2.0 Authorization Code flow. This endpoint prompts the user for login and redirects to the registered redirect URI with an authorization code and optional state parameter.


🔐 Authentication

No authentication is required for this endpoint. It is publicly accessible for initiating login.


📥 Query Parameters

NameTypeRequiredDescription
client_idstringYesClient ID issued during client onboarding
response_typestringYesType of response expected, e.g., code
scopestringYesRequested scopes, e.g., openid
redirect_uristringYesURI to redirect after successful authorization
statestringNoRandom client-generated string to maintain request/response integrity

🔄 Response (Redirect)

NameTypeDescription
codestringAuthorization code to exchange for tokens
statestringEchoes the state parameter from request (if provided)

📘 Example Request

GET https://auth.relid.com:8006/relid/authserver/oauth/authorize?client_id=YzA4MjlmNjgtNGI0ZC00MmFjLTgyOWYtNjg0YjRkMTJhY2I0&response_type=code&scope=all+openid&state=12345&redirect_uri=https://localhost:8080/

📘 Example Response (303 Redirect)

HTTP/1.1 303 See Other
Location: https://localhost:8080/?code=FBWHrJK9XJNhchVr...&state=12345

📝 Notes

  • The authorization code received must be exchanged for an access token using the /oauth/token endpoint.
  • The redirect_uri must match the one registered during client onboarding.