Documentation / @agentick/gateway / UserContext
Interface: UserContext
Defined in: kernel/src/context.ts:30
User information associated with the current execution context.
This is typically populated from authentication/authorization systems and flows through all operations via the KernelContext.
Example
typescript
const ctx = Context.create({
user: {
id: 'user-123',
tenantId: 'tenant-abc',
roles: ['admin', 'editor'],
email: 'user@example.com', // Custom fields allowed
}
});See
KernelContext.user - Where user context is stored
Indexable
[key: string]: any
Additional user properties (extensible)
Properties
id
id:
string
Defined in: kernel/src/context.ts:32
Unique identifier for the user
roles?
optionalroles:string[]
Defined in: kernel/src/context.ts:36
User's roles for authorization
tenantId?
optionaltenantId:string
Defined in: kernel/src/context.ts:34
Multi-tenant organization identifier