Bienvenue sur le serveur OAuth
Pour commencer
Pour utiliser ce serveur OAuth, veuillez nous contacter pour demander une application OAuth.
Veuillez fournir une brève description de l'application que vous créez, ainsi que les détails ci-dessous. Pas de soucis si vous n'êtes pas sûr - nous pouvons utiliser la description que vous fournissez pour vous aider.
- La type de client: public ou confidentiel ?
- Le type d'autorisation: autorisation ou identifiants client ?
- Les URI de redirection autorisés.
- Les ressources auxquelles vous souhaitez accéder. Veuillez explorer notre Documentation APIet nos API GraphQL.
Exemple (autorisation)
3. Code d'autorisation d'échange pour le jeton d'accès
POST /token/
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&code=AUTH_CODE&redirect_uri=YOUR_REDIRECT_URI&client_id=YOUR_CLIENT_ID&code_verifier=YOUR_CODE_VERIFIER
Exemple (informations d'identification du client)
1. Identifiants Exchange pour un jeton d'accès
POST /token/
Authorization: Basic BASE64_ENCODED(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
2. Accéder à la ressource protégée
GET /resource/
Authorization: YOUR_ACCESS_TOKEN
Exemple (appareil)
2. Authentifier l'appareil
Après avoir effectué la demande de device-authorization, l'appareil doit tenter d'acquérir un jeton d'accès toutes les quelques secondes (à un rythme spécifié par interval en secondes) en effectuant la requête suivante pendant que l'utilisateur autorise l'appareil.
POST /token/
Content-Type: application/x-www-form-urlencoded
client_id=YOUR_CLIENT_ID&device_code=DEVICE_CODE&grant_type=urn:ietf:params:oauth:grant-type:device_code
3. Accéder à la ressource protégée
GET /resource/
Authorization: YOUR_ACCESS_TOKEN
Example (token exchange)
RFC 8693 delegation semantics are supported. This means that you will use the client credentials token in both the Authorization header and the actor_token, as shown below.
1. Retrieve an access token for your client credentials app, as described in Exemple (informations d'identification du client).
2. Assuming EXTERNAL_IDP_USER_ACCESS_TOKEN has been issued by your external IdP, perform the token exchange call:
POST /token
Authorization: YOUR_CLIENT_CREDENTIALS_ACCESS_TOKEN
Content-Type: application/x-www-form-urlencoded
grant_type="urn:ietf:params:oauth:grant-type:token-exchange"&
actor_token_type="urn:ietf:params:oauth:token-type:access_token"&
actor_token=YOUR_CLIENT_CREDENTIALS_ACCESS_TOKEN&
subject_token_type="urn:ietf:params:oauth:token-type:access_token"&
subject_token=EXTERNAL_IDP_USER_ACCESS_TOKEN
3. Accéder à la ressource protégée
GET /resource/
Authorization: YOUR_ACCESS_TOKEN