Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions main/docs/authenticate/login/logout/log-users-out-of-auth0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,34 @@ import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";

import {AuthCodeGroup} from "/snippets/AuthCodeGroup.jsx";

export const codeExample3 = `https://{yourDomain}/oidc/logout?{clientId}={yourClientId}&logout_hint={sessionId}`;

export const codeExample4 = `https://{yourDomain}/oidc/logout?post_logout_redirect_uri=http%3A%2F%2Fwww.example.com`;

export const codeExample5 = `PATCH https://{yourDomain}/api/v2/clients/{clientId}
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

export const codeExample6 = `PATCH https://{yourDomain}/api/v2/tenants/settings
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

Auth0 implements <Tooltip tip="OpenID: Open standard for authentication that allows applications to verify users' identities without collecting and storing login information." cta="View Glossary" href="/docs/glossary?term=OpenID">OpenID</Tooltip> Connect’s [RP-Initiated Logout 1.0](https://openid.net/specs/openid-connect-rpinitiated-1_0.html) for end-user logout. This standard is part of the OpenID Connect collection of [final specifications](https://openid.net/developers/specs/).

## How it works
Expand Down Expand Up @@ -176,9 +204,7 @@ You must use the session ID (`sid`) associated with the ID token issued by Auth0

{/* codeblockOld.header.login.logInButton codeblockOld.header.login.configureSnippet */}

export const codeExample3 = `https://{yourDomain}/oidc/logout?{clientId}={yourClientId}&logout_hint={sessionId}`;

<AuthCodeBlock children={codeExample3} language="http" />
<AuthCodeBlock children={codeExample3} language="bash" />

#### post_logout_redirect_uri parameter

Expand All @@ -189,9 +215,7 @@ The value of the `post_logout_redirect_uri` parameter must be a valid, encoded U

##### Example

export const codeExample4 = `https://{yourDomain}/oidc/logout?post_logout_redirect_uri=http%3A%2F%2Fwww.example.com`;

<AuthCodeBlock children={codeExample4} language="bash" filename="HTTP" />
<AuthCodeBlock children={codeExample4} language="http" filename="HTTP" />

##### Update application Allowed Logout URLs

Expand Down Expand Up @@ -221,19 +245,7 @@ To register a URL with your application’s list of **Allowed Logout URLs** with
1. [Get a Management API access token](/docs/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-production) that includes the `update:clients` scopes.
2. Call the Management API [Update a client](https://auth0.com/docs/api/management/v2/clients/patch-clients-by-id) endpoint, and ensure that you include the URL in the value of the `allowed_logout_urls` field within the request body.

export const codeExample5 = ` PATCH https://{yourDomain}/api/v2/clients/{clientId}
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

<AuthCodeBlock children={codeExample5} language="json" />
<AuthCodeBlock children={codeExample5} language="http" />

</Tab></Tabs>

Expand Down Expand Up @@ -264,19 +276,7 @@ To register a URL with your tenant’s list of **Allowed Logout URLs** with the
1. [Get a Management API access token](/docs/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-production) that includes the `update:tenant_settings` scopes.
2. Call the Management API [Update tenant settings](https://auth0.com/docs/api/management/v2/tenants/patch-settings) endpoint, and ensure that you include the URL in the value of the `allowed_logout_urls` field within the request body.

export const codeExample6 = ` PATCH https://{yourDomain}/api/v2/tenants/settings
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

<AuthCodeBlock children={codeExample6} language="json" />
<AuthCodeBlock children={codeExample6} language="http" />

</Tab></Tabs>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To implement flexible connection switching, you will configure custom prompt par
<tr>
<td><code>state</code></td>
<td>Renders the current page's state value, which is opaque and used for security purposes.<br/><br/>To learn more about current screen information, review <a href="/docs/customize/login-pages/universal-login/customize-templates#current-screen-information">Customize Univeral Login Page Templates</a>.</td>
<td><code>&lt;input type='hidden' name='state' value='{{state}}'&gt;</code></td>
<td><code>&lt;input type='hidden' name='state' value='&#123;&#123;state&#125;&#125;'&gt;</code></td>
</tr>
<tr>
<td><code>connection</code></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,41 @@ permalink: "log-users-out-of-auth0"
---
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";

export const codeExample1 = `https://{yourDomain}/oidc/logout?id_token_hint={yourIdToken}&post_logout_redirect_uri={yourCallbackUrl}`;

export const codeExample2 = `curl --request GET \\
--url 'https://{yourDomain}/oidc/logout' \\
--header 'content-type: application/x-www-form-urlencoded' \\
--data 'id_token_hint={yourIdToken}' \\
--data 'post_logout_redirect_uri={yourCallbackUrl}'`;

export const codeExample3 = `https://{yourDomain}/oidc/logout?{clientId}={yourClientId}&logout_hint={sessionId}`;

export const codeExample4 = `https://{yourDomain}/oidc/logout?post_logout_redirect_uri=http%3A%2F%2Fwww.example.com`;

export const codeExample5 = `PATCH https://{yourDomain}/api/v2/clients/{clientId}
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

export const codeExample6 = `PATCH https://{yourDomain}/api/v2/tenants/settings
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

Auth0 implémente la [déconnexion initié par RP 1.0](https://openid.net/specs/openid-connect-rpinitiated-1_0.html) d’<Tooltip href="/docs/docs/fr-ca/glossary?term=openid" tip="OpenID
Norme ouverte d’authentification qui permet aux applications de vérifier l’identité des utilisateurs sans avoir à collecter leurs informations de connexion." cta="Voir le glossaire">OpenID</Tooltip> Connect pour la déconnexion de l’utilisateur final. Cette norme fait partie de l’ensemble de [spécifications finales](https://openid.net/developers/specs/) OpenID Connect.
Expand Down Expand Up @@ -149,18 +184,10 @@ Le jeton d’ID contient l’émetteur des demandes enregistrées (`iss`), l'<To

<Tabs><Tab title="HTTP">

export const codeExample1 = `https://{yourDomain}/oidc/logout?id_token_hint={yourIdToken}&post_logout_redirect_uri={yourCallbackUrl}`;

<AuthCodeBlock children={codeExample1} language="bash" />
<AuthCodeBlock children={codeExample1} language="http" />

</Tab><Tab title="cURL">

export const codeExample2 = `curl --request GET \
--url 'https://{yourDomain}/oidc/logout' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'id_token_hint={yourIdToken}' \
--data 'post_logout_redirect_uri={yourCallbackUrl}'`;

<AuthCodeBlock children={codeExample2} language="bash" />

</Tab></Tabs>
Expand All @@ -179,11 +206,7 @@ Vous devez utiliser l’ID de session (`sid`) associé au jeton d’ID émis par

##### Exemple



export const codeExample3 = `https://{yourDomain}/oidc/logout?{clientId}={yourClientId}&logout_hint={sessionId}`;

<AuthCodeBlock children={codeExample3} language="bash" />
<AuthCodeBlock children={codeExample3} language="http" />

#### Paramètre post_logout_redirect_uri

Expand All @@ -194,9 +217,7 @@ La valeur du paramètre `post_logout_redirect_uri` doit être une URL codée va

##### Exemple

export const codeExample4 = `https://{yourDomain}/oidc/logout?post_logout_redirect_uri=http%3A%2F%2Fwww.example.com`;

<AuthCodeBlock children={codeExample4} language="bash" />
<AuthCodeBlock children={codeExample4} language="http" />

##### Mettre à jour les URL de déconnexion autorisées de l’application

Expand Down Expand Up @@ -226,19 +247,7 @@ Pour enregistrer une URL avec la liste des **URL de déconnexion autorisées** d
1. [Obtenir un jeton d’accès à Management API](https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-access-tokens-for-production) qui comprend les permissions `update:clients`.
2. Appelez le point de terminaison [Mettre à jour un client](https://auth0.com/docs/api/management/v2/clients/patch-clients-by-id) de Management API et assurez-vous d’inclure l’URL dans la valeur du champ `allowed_logout_urls` dans le corps de la demande.

export const codeExample5 = ` PATCH https://{yourDomain}/api/v2/clients/{clientId}
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

<AuthCodeBlock children={codeExample5} language="text" lines />
<AuthCodeBlock children={codeExample5} language="http" lines />

</Tab></Tabs>

Expand Down Expand Up @@ -269,19 +278,7 @@ Pour enregistrer une URL avec la liste des **URL de déconnexion autorisées** d
1. [Obtenez un jeton d’accès à Management API](/docs/docs/fr-ca/secure/tokens/access-tokens/management-api-access-tokens/get-management-api-access-tokens-for-production) qui comprend les permissions `update:tenant_settings`.
2. Appelez le point de terminaison [Mettre à jour les paramètres du locataire](/docs/docs/fr-ca/api/management/v2/tenants/patch-settings) de Management API et assurez-vous d’inclure l’URL dans la valeur du champ `allowed_logout_urls` dans le corps de la demande.

export const codeExample6 = ` PATCH https://{yourDomain}/api/v2/tenants/settings
Authorization: Bearer {yourMgmtApiAccessToken}
Content-Type: application/json

{
"allowed_logout_urls": [
"https://www.example.com",
"https://www.example.com/logout"
]
}
`;

<AuthCodeBlock children={codeExample6} language="text" lines />
<AuthCodeBlock children={codeExample6} language="http" lines />

</Tab></Tabs>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To implement flexible connection switching, you will configure custom prompt par
<tr>
<td><code>state</code></td>
<td>Renders the current page's state value, which is opaque and used for security purposes.<br/><br/>To learn more about current screen information, review <a href="/docs/docs/customize/login-pages/universal-login/customize-templates#current-screen-information">Customize Univeral Login Page Templates</a>.</td>
<td><code>&lt;input type='hidden' name='state' value='{{state}}'&gt;</code></td>
<td><code>&lt;input type='hidden' name='state' value='&#123;&#123;state&#125;&#125;'&gt;</code></td>
</tr>
<tr>
<td><code>connection</code></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ permalink: "configure-access-token-profile"
---
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";

export const codeExample = `curl --request PATCH \\
--url 'https://{yourDomain}/api/v2/resource-servers/API_ID' \\
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \\
--header 'content-type: application/json' \\
--data '{"token_dialect": "TOKEN_DIALECT" }'
`;

Vous pouvez choisir le profil de jeton d’accès à utiliser pour vos API : le profil de jeton Auth0 ou le profil de jeton RFC 9068. Le profil de jeton d’accès que vous configurez détermine le format des jetons d’accès émis pour l’API.

Expand Down Expand Up @@ -37,12 +43,6 @@ Lorsque vous utilisez Management API, nous désignons les profils de jeton d’a

L’exemple de code suivant envoie une demande PATCH au point de terminaison [Mettre à jour un serveur de ressources](https://auth0.com/docs/api/management/v2/resource-servers/patch-resource-servers-by-id) :

export const codeExample = `curl --request PATCH \
--url 'https://{yourDomain}/api/v2/resource-servers/API_ID' \
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{"token_dialect": "TOKEN_DIALECT" }'`;

<AuthCodeBlock children={codeExample} language="bash" />

Remplacez les valeurs `API_ID`, `MGMT_API_ACCESS_TOKEN` et `TOKEN_DIALECT` par leurs valeurs respectives, comme indiqué dans le tableau suivant :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ permalink: "authorize-m2m-access"
---
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";

export const codeExample = `curl -X POST --location "https://{yourDomain}/api/v2/organizations/{ORG_id}/client-grants" \\
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \\
--header 'content-type: application/json' \\
--data '{
"grant_id": "GRANT_ID"
}'
`;


Pour autoriser l’accès à la communication entre machines pour une application, vous devez lui permettre d’utiliser une organisation pour une API spécifique. Pour ce faire, vous devez associer l’autorisation client de l’application à l’API correspondante avec l’organisation. Une fois associée, l’application peut utiliser l’organisation lors de la demande de jetons pour l’API et les permissions définies dans l’autorisation client. Vous devrez définir cette association pour chaque API à laquelle votre application doit accéder pour l’organisation.

Expand All @@ -32,14 +40,7 @@ Pour associer l’autorisation client d’une application à une organisation vi

Les autorisations de client d’application peuvent être associées à une organization via le point de terminaison [Associate client grant to organization (Associer une autorisation client à une organisation)](/docs/docs/fr-ca/api/management/v2/organizations/create-organization-client-grants) :

export const codeExample = `curl -X POST --location "https://{yourDomain}/api/v2/organizations/{ORG_id}/client-grants" \
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"grant_id": "GRANT_ID"
}'`;

<AuthCodeBlock children={codeExample} language="json" />
<AuthCodeBlock children={codeExample} language="bash" />

</Tab></Tabs>

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,40 @@ permalink: "configure-your-application-for-m2m-access"
---
import {AuthCodeBlock} from "/snippets/AuthCodeBlock.jsx";

export const codeExample1 = `curl --request POST \\
--url 'https://{yourDomain}/api/v2/client-grants' \\
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \\
--header 'content-type: application/json' \\
--data '{
"client_id": "CLIENT_ID",
"audience": "API_IDENTIFIER",
"scope": [
"scope1",
"scope2"
],
"organization_usage": "ORG_USAGE",
"allow_any_organization": false
}'
`;

export const codeExample2 = `curl --request PATCH \\
--url 'https://{yourDomain}/api/v2/client-grants/CLIENT_GRANT_ID' \\
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \\
--header 'content-type: application/json' \\
--data '{
"organization_usage": "ORG_USAGE",
"allow_any_organization": false
}'
`;

export const codeExample3 = `curl -X PATCH --location "https://{yourDomain}/api/v2/clients/{CLIENT_ID}" \\
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \\
--header 'content-type: application/json' \\
--data '{
"default_organization": "ORGANIZATION_ID",
"flows": ["client_credentials"]
}'
`;

Après avoir créé l’application, configurez-la pour l’accès communication entre machines en procédant comme suit :

Expand Down Expand Up @@ -76,35 +110,11 @@ Vous pouvez également définir le comportement organisationnel d’une applicat

L’exemple de code suivant crée un objet `client_grant` avec un accès M2M :

export const codeExample1 = `curl --request POST \
--url 'https://{yourDomain}/api/v2/client-grants' \
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"client_id": "CLIENT_ID",
"audience": "API_IDENTIFIER",
"scope": [
"scope1",
"scope2"
],
"organization_usage": "ORG_USAGE",
"allow_any_organization": false
}'`;

<AuthCodeBlock children={codeExample1} language="json" />
<AuthCodeBlock children={codeExample1} language="bash" />

L’exemple de code suivant met à jour un objet `client_grant` avec un accès M2M :

export const codeExample2 = `curl --request PATCH \
--url 'https://{yourDomain}/api/v2/client-grants/CLIENT_GRANT_ID' \
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"organization_usage": "ORG_USAGE",
"allow_any_organization": false
}'`;

<AuthCodeBlock children={codeExample2} language="json" />
<AuthCodeBlock children={codeExample2} language="bash" />

</Tab></Tabs>

Expand Down Expand Up @@ -159,15 +169,7 @@ Vous pouvez configurer l’organization par défaut pour une application via les

L’exemple de code suivant met à jour un client avec une organization par défaut :

export const codeExample3 = `curl -X PATCH --location "https://{yourDomain}/api/v2/clients/{CLIENT_ID}" \
--header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"default_organization": "ORGANIZATION_ID",
"flows": ["client_credentials"]
}'`;

<AuthCodeBlock children={codeExample3} language="json" />
<AuthCodeBlock children={codeExample3} language="bash" />

</Tab></Tabs>

Loading