Skip to main content

Interface: SecurityContext<T>

Security state carried alongside an AxiSpark execution.

Authentication engines write authenticated, authenticationMethod, and data; authorization engines write authorized and authorizationDecisions. The context extends the transport-neutral ExecutionContext, so the same authenticator and policy abstractions work across HTTP, messaging, jobs, and other supported transports. The application chooses the shape and meaning of data.

Extends​

Type Parameters​

T​

T = unknown

Shape of the application-defined identity/claims value.

Properties​

authenticated​

authenticated: boolean

Whether an authenticator has returned a truthy identity value.


authenticationMethod?​

optional authenticationMethod?: ClassType<Authenticator>

Class of the authenticator whose truthy result authenticated this execution.


authorizationDecisions?​

optional authorizationDecisions?: AuthorizationDecision[]

Decisions returned by each evaluated policy, in evaluation order.


authorized​

authorized: boolean

Whether all configured policies allowed this execution.


data?​

optional data?: T

Application-defined identity, principal, or claims returned by an authenticator.


error?​

optional error?: Error

Inherited from​

ExecutionContext.error


propertyKey​

propertyKey: string | symbol

Inherited from​

ExecutionContext.propertyKey


scopedContainer​

scopedContainer: ScopedContainer

Inherited from​

ExecutionContext.scopedContainer


securedMethod​

securedMethod: boolean

True when the target class or method has @Secured() metadata.


target​

target: ClassType

Inherited from​

ExecutionContext.target


transport​

transport: ExecutionTransport

Inherited from​

ExecutionContext.transport