Skip to content

client.identity

client.identity — the identity operations.

On AsyncKindgi every method is the same, awaited.

whoami(*, timeout: float | None = None) -> WhoamiResult

Self — the caller's user + tenant + session context. GET /v1/identity/whoami

Reflects the auth middleware's attached context: tenantId + scopes always; userId / sessionId / providerId / expiresAt when the caller is on a session token; the fuller UserRecord under user when a userId is present and the IdentityDirectoryBinding resolves it. Always mounted — the /users/* routes only mount when the directory binding is wired.