| 1 |
URLs & Views |
| 2 |
============ |
| 3 |
|
| 4 |
Your project ``urls.py`` should include: |
| 5 |
|
| 6 |
.. code-block:: python |
| 7 |
|
| 8 |
urlpatterns = [ |
| 9 |
... |
| 10 |
path("", include("allauth.idp.urls")), |
| 11 |
... |
| 12 |
] |
| 13 |
|
| 14 |
The above will enable the following views: |
| 15 |
|
| 16 |
``/.well-known/openid-configuration`` |
| 17 |
Provides the OpenID Provider Configuration Information. This endpoint returns |
| 18 |
a JSON document that includes metadata about the OIDC provider, such as |
| 19 |
supported authentication methods, token endpoints, and available scopes. |
| 20 |
|
| 21 |
``/.well-known/jwks.json`` |
| 22 |
Serves the JSON Web Key Set (JWKS) used to verify the signatures of JWTs |
| 23 |
issued by the OIDC provider. Clients use this to validate ID tokens and access |
| 24 |
tokens. |
| 25 |
|
| 26 |
``/identity/o/authorize`` |
| 27 |
The authorization endpoint used to initiate the OAuth2/OIDC flow. It handles |
| 28 |
authentication requests and issues authorization codes or tokens based on the |
| 29 |
request parameters. |
| 30 |
|
| 31 |
``/identity/o/api/clients`` |
| 32 |
The Dynamic Client Registration (`RFC 7591 |
| 33 |
<https://www.rfc-editor.org/rfc/rfc7591>`_) endpoint. Allows clients to |
| 34 |
register themselves by POSTing their metadata. Only available when |
| 35 |
``IDP_OIDC_DCR_ENABLED`` is set to ``True``. |
| 36 |
|
| 37 |
``/identity/o/api/revoke`` |
| 38 |
Allows clients to revoke access or refresh tokens. This endpoint helps |
| 39 |
maintain security by invalidating credentials that are no longer needed or |
| 40 |
have been compromised. |
| 41 |
|
| 42 |
``/identity/o/api/userinfo`` |
| 43 |
Returns user profile information in a JSON format. This endpoint is typically |
| 44 |
used after a successful authentication to fetch claims about the authenticated |
| 45 |
user. |
| 46 |
|
| 47 |
``/identity/o/api/token`` |
| 48 |
Handles the exchange of authorization codes for tokens, or client credentials |
| 49 |
for access tokens. This is a key component of the token flow in OAuth2/OIDC. |