GET
/api/whoamiAuthenticatedWho am I
Returns the identity resolved from the presented credential, plus which auth scheme resolved it and the scope granted to the token.
operationId
get_api_whoamiAccountAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- SchemaVaults access token (Bearer)
Authorization: Bearer <JWT> - SchemaVaults access token (cookie)
cookie "access_token_<api_server_id>"
- SchemaVaults access token (Bearer)
- Who may call
- Any authenticated user
Responses
application/json
Whoami
| Property | Type | Description |
|---|---|---|
| uid* | string | SchemaVaults user id |
| email* | string | null | null | |
| admin* | boolean | |
| scheme* | string | Name of the auth scheme that resolved the credential |
| scope* | string | null | null | Space separated scope granted to the token, or null when it carries no scope claim |
JSONExample
"uid""string"
"email""string"
"admin"true
"scheme""schemavaults-access-token"
"scope""string"
Example request
bashcurl
curl -X GET 'https://example-nextjs-resource-server.schemavaults.com/api/whoami' \
-H 'Authorization: Bearer <access_token>'