-
-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add changeset for impersonation (#6251)
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
"@logto/core": minor | ||
--- | ||
|
||
implement token exchange for user impersonation | ||
|
||
Added support for user impersonation via token exchange: | ||
|
||
1. New endpoint: `POST /subject-tokens` (Management API) | ||
- Request body: `{ "userId": "<user-id>" }` | ||
- Returns a subject token | ||
|
||
2. Enhanced `POST /oidc/token` endpoint (OIDC API) | ||
- Supports new grant type: `urn:ietf:params:oauth:grant-type:token-exchange` | ||
- Request body: | ||
```json | ||
{ | ||
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange", | ||
"subject_token": "<subject-token>", | ||
"subject_token_type": "urn:ietf:params:oauth:token-type:access_token", | ||
"client_id": "<client-id>" | ||
} | ||
``` | ||
- Returns an impersonated access token | ||
|
||
Refer to documentation for usage examples and the [Token Exchange RFC](https://tools.ietf.org/html/rfc8693) for more details. |