Skip to content

Commit

Permalink
fix:update docs according to the latest changes in hydra
Browse files Browse the repository at this point in the history
  • Loading branch information
sgal committed Mar 23, 2023
1 parent 26f66b9 commit 45411f6
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions docs/hydra/guides/updating-claims-at-refresh.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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
```

Expand Down Expand Up @@ -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": {}
},
Expand All @@ -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
<Tabs>
<TabItem value="client_credentials" label="client_credentials" default>
<CodeBlock language="json">{`
{
"grant_type": [
"client_credentials"
],
"audience": ["my-api"],
"scope": ["user:profile:read"]
}
`}</CodeBlock>
</TabItem>
<TabItem value="urn:ietf:params:oauth:client-assertion-type:jwt-bearer" label="urn:ietf:params:oauth:client-assertion-type:jwt-bearer">
<CodeBlock language="json">{`
```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"]
}
`}</CodeBlock>
</TabItem>
</Tabs>
```

:::note
Expand Down

0 comments on commit 45411f6

Please sign in to comment.