The OAuth 2.0 authorization request is sent by the client to the RapidIdentity authorization endpoint to begin the authorization code flow. RapidIdentity authenticates the user, obtains authorization, and returns an authorization code to the client.
Endpoint
Method:
GETPath: /idp/profile/oauth2/authorize
Request Parameters
| Parameter | Recommendation | Description |
|---|---|---|
response_type | Required | Set to code to use the authorization code
flow. |
client_id | Required | The identifier issued by RapidIdentity to the client during client registration. |
redirect_uri | Required | The URI to which RapidIdentity redirects after authorization. The value must match a redirect URI registered on the client. |
scope | Optional | A space-separated list of scopes the client is requesting. |
state | Recommended | A value used to maintain state between the request and the callback, along with preventing cross-site request forgery (CSRF). |
code_challenge | Recommended | The Proof Key for Code Exchange (PKCE) code challenge. It is required for public clients. |
code_challenge_method | Recommended | The PKCE transformation method. Set the value to S256. |
Example Request
GET /idp/profile/oauth2/authorize?
response_type=code
&client_id=example-client
&redirect_uri=https%3A%2F%2Fclient.example.com%2Fcallback
&scope=read
&state=xyz123
&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
&code_challenge_method=S256