Skip to content

Commit

Permalink
change to active voice
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Nov 5, 2024
1 parent 2a4a7d2 commit 6eedb4d
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions docs/oauth2-oidc/resource-owner-password-grant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@ sidebar_label: Resource owner password flow

:::info

The resource owner password credentials grant is a legacy grant that is only supported in Ory Network for enterprise customers.
Please contact [[email protected]](mailto:[email protected]) for support.
The resource owner password credentials grant is a legacy grant that Ory Network only supports for enterprise customers. Please
contact [[email protected]](mailto:[email protected]) for support.

:::

The OAuth 2.0 Resource Owner Password Credentials Grant is an OAuth 2.0 grant where the application exchanges the user's username
and password for an access token. This grant type is suitable for clients which are highly trusted by the user, such as his or her
computer operating system or a highly privileged application. This grant type works as follows:
and password for an access token. This grant type suits clients highly trusted by the user, such as their computer operating
system or a highly privileged application. This grant type works as follows:

1. The resource owner (i.e., the user) provides his or her username and password directly to the client.
2. The client sends a POST request with following parameters in the request body using form encoding to the token endpoint:
1. The resource owner (i.e., the user) provides their username and password directly to the client.
2. The client sends a POST request with the following parameters in the request body using form encoding to the token endpoint:

- `grant_type`: The value must be `password`.
- `client_id`: The ID of the client that is making the request.
- `client_secret`: The client secret that is used to authenticate the client. Only necessary if `token_endpoint_auth_method` is
set to `"client_secret_post"` in the OAuth2 client.
- `client_id`: The ID of the client making the request.
- `client_secret`: The client secret used to authenticate the client. Only necessary if `token_endpoint_auth_method` is set to
`"client_secret_post"` in the OAuth2 client.
- `username`: The resource owner username.
- `password`: The resource owner password.

3. If the credentials are valid, the authorization server responds with an access token. This OAuth 2.0 grant does not support
refresh tokens. The client has to ask the user for username and password whenever the access token expires.
refresh tokens. The client has to ask the user for their username and password whenever the access token expires.

To use the Resource Owner Password Credentials Grant, you need to include the "password" grant in the supported grant types. In
the Ory Console, edit the grant types by creating or editing an OAuth client.
To use the Resource Owner Password Credentials Grant, include the "password" grant in the supported grant types. In the Ory
Console, edit the grant types by creating or editing an OAuth client.

The credentials (username and password) are checked against Ory Identities. The user that is authenticated must already exist.
Ory Identities checks the credentials (username and password). The user being authenticated must already exist.

```mdx-code-block
import Mermaid from "@site/src/theme/Mermaid";
Expand All @@ -51,9 +51,9 @@ import Mermaid from "@site/src/theme/Mermaid";

## Token introspection and access token claims

The access token that is issued can be introspected using the OAuth 2.0 Token Introspection endpoint. The following claims are
returned from the introspection endpoint, and part of the access token if the config paramater `strategies.access_token` is set to
`jwt`:
You can introspect the access token that is issued using the OAuth 2.0 Token Introspection endpoint. The following claims are
returned from the introspection endpoint and are part of the access token if the config parameter `strategies.access_token` is set
to `jwt`:

- `sub`: The Ory Network identity ID of the user.
- `client_id`: The ID of the OAuth 2.0 client.
Expand All @@ -62,7 +62,7 @@ returned from the introspection endpoint, and part of the access token if the co
- `iss`: The issuer of the token, the URL of the Ory Network instance.
- `ext.username`: The username of the user, as passed in the token request.

An example of the body returned from the introspection endpoint:
Here is an example of the body returned from the introspection endpoint:

```json
{
Expand All @@ -86,5 +86,5 @@ An example of the body returned from the introspection endpoint:

### Customizing the claims

The claims in the access token and introspection data can be further customized using a
You can further customize the claims in the access token and introspection data using a
[token hook](/hydra/guides/oauth2-webhooks.mdx).

0 comments on commit 6eedb4d

Please sign in to comment.