Connectum API Reference / @connectum/auth / AuthContext
Interface: AuthContext
Defined in: packages/auth/src/types.ts:22
Authenticated user context
Represents the result of authentication. Set by auth interceptor, accessible via getAuthContext() in handlers and downstream interceptors.
Properties
claims
readonlyclaims:Readonly<Record<string,unknown>>
Defined in: packages/auth/src/types.ts:32
Raw claims from the credential (JWT claims, API key metadata, etc.)
expiresAt?
readonlyoptionalexpiresAt:Date
Defined in: packages/auth/src/types.ts:36
Credential expiration time
name?
readonlyoptionalname:string
Defined in: packages/auth/src/types.ts:26
Human-readable display name
roles
readonlyroles: readonlystring[]
Defined in: packages/auth/src/types.ts:28
Assigned roles (e.g., ["admin", "user"])
scopes
readonlyscopes: readonlystring[]
Defined in: packages/auth/src/types.ts:30
Granted scopes (e.g., ["read", "write"])
subject
readonlysubject:string
Defined in: packages/auth/src/types.ts:24
Authenticated subject identifier (user ID, service account, etc.)
type
readonlytype:string
Defined in: packages/auth/src/types.ts:34
Credential type identifier (e.g., "jwt", "api-key", "mtls")
