diff --git a/docs/hydra/guides/updating-claims-at-refresh.mdx b/docs/hydra/guides/updating-claims-at-refresh.mdx index e62cf11a30..934c679cd5 100644 --- a/docs/hydra/guides/updating-claims-at-refresh.mdx +++ b/docs/hydra/guides/updating-claims-at-refresh.mdx @@ -38,13 +38,13 @@ Use the Ory CLI with following keys to enable this feature: ```shell title="Enable the authorization code hook" ory patch oauth2-config {project.id} \ - --replace "/oauth2/authorization_code_hook=\"https://my-example.app/authorization-code-hook\"" \ + --add "/oauth2/authorization_code_hook=\"https://my-example.app/authorization-code-hook\"" \ --format yaml ``` ```shell title="Enable the client credentials token hook" ory patch oauth2-config {project.id} \ - --replace "/oauth2/client_credentials_hook=\"https://my-example.app/client-credentials-hook\"" \ + --add "/oauth2/client_credentials_hook=\"https://my-example.app/client-credentials-hook\"" \ --format yaml ``` @@ -56,7 +56,7 @@ ory patch oauth2-config {project.id} \ ```shell title="Enable the jwt-bearer token hook" ory patch oauth2-config {project.id} \ - --replace "/oauth2/jwt_bearer_hook=\"https://my-example.app/jwt-bearer-hook\"" \ + --add "/oauth2/jwt_bearer_hook=\"https://my-example.app/jwt-bearer-hook\"" \ --format yaml ``` @@ -103,9 +103,6 @@ The token hook endpoint must accept the following payload format: "kid": "key-id" }, "requester": { - "client_id": "bar", - "granted_scopes": ["openid", "offline"], - "granted_audience": [], "grant_types": ["refresh_token"], "payload": {} }, @@ -124,36 +121,16 @@ The token hook endpoint must accept the following payload format: ### Requester payload -For `client_credentials` and `jwt-bearer` grant types, the entire payload that you send to the `/token` endpoint will also be sent -to the configured webhook URL. +For `jwt-bearer` grant type, the payload that you send to the `/token` endpoint will also be sent to the configured webhook URL. -Here's the format of the `requester.payload` field for each grant type: +Here's the format of the `requester.payload: -```mdx-code-block - - - {` -{ - "grant_type": [ - "client_credentials" - ], - "audience": ["my-api"], - "scope": ["user:profile:read"] -} - `} - - - {` +```json { - "grant_type": [ - "urn:ietf:params:oauth:client-assertion-type:jwt-bearer" - ], + "grant_type": ["urn:ietf:params:oauth:client-assertion-type:jwt-bearer"], "assertion": ["eyJhbGciOiJIUzI..."], "scope": ["user:profile:read"] } - `} - - ``` :::note