SchemaVaults logoSchemaVaultsAuth example app
GET/api/whoamiAuthenticated

Who am I

Returns the identity resolved from the presented credential, plus which auth scheme resolved it, the scope granted to the token and, for a delegated token, who acts on the user's behalf.

operationId get_api_whoamiAccount

Authentication & permissionsAuthenticated

Any authenticated user

Accepted credentials
Who may call
Any authenticated user

Responses

application/json
Whoami
PropertyTypeDescription
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

actor*object | null | null

Who acts on behalf of the user (a delegated token); null for the user's own token

sub*string

The current actor (RFC 8693 act.sub), e.g. a client app's agent

client_id*string | null | null

The client app the actor acts through

JSONExample
"uid""string"
"email""string"
"admin"true
"scheme""schemavaults-access-token"
"scope""string"
"actor"
"sub""string"
"client_id""string"

Example request

bashcurl
curl -X GET 'https://example-nextjs-resource-server.schemavaults.com/api/whoami' \
  -H 'Authorization: Bearer <access_token>'