Optionaloptions: SessionContextOptionsOptionalcurrentThe object on which the current operation is being performed.
Optional ReadonlyrequestThe RequestHeader of the request currently being served through this context, when one is
available. A context built for one Call service invocation (see ServerSession's
per-request context, opcua_server.ts _on_CallRequest) carries the RequestHeader of that
CallRequest, so a bound Method handler can read context.requestHeader?.auditEntryId -
OPC 10000-4 v1.05.07 §7.32 RequestHeader - and copy it into ClientAuditEntryId when it
raises an AuditEventType - OPC 10000-5 v1.05.06 §6.4.3. undefined for a context with no
request behind it, e.g. a Session's own long-lived sessionContext, or most PseudoSession
calls.
Optional ReadonlyserverOptional ReadonlysessionThe underlying OPC UA session, if available.
StaticdefaultThe application URI extracted from the client
certificate's SubjectAltName, or null if
no certificate is available.
The client's application-instance certificate,
or null if no secure channel is available.
The URL of the Endpoint the Session was created on, or null if unknown.
Check whether the current user has the given permission on a node.
requestHeader?.auditEntryId, or undefined when either is absent or the id is empty -
see ISessionContext.getAuditEntryId.
getCurrentUserRoles
guest => anonymous user (unauthenticated) default => default authenticated user
The Session's preferred locales, most preferred first (OPC 10000-4 v1.05.07 §5.7.3
ActivateSession localeIds, §5.4 Locale Negotiation). [] without a Session, or before
the Session's first successful ActivateSession with a non-empty localeIds.
Returns the user name of the current user.
Returns a JSON representation of the context
Returns a string representation of the context
A SessionContext identical to this one, plus requestHeader (and the getAuditEntryId()
it feeds). Deliberately a new instance rather than a mutation of this: build one per
Call service invocation (see opcua_server.ts _on_CallRequest), never by writing onto the
Session's own long-lived sessionContext. That object is shared and read concurrently by
every request in flight on the Session (ServerSession#sessionContext is one instance for
the Session's whole lifetime - see also UAMethodImpl#execute, which already mutates
context.object on whatever context it is handed), so a shared mutable RequestHeader
field would let two Calls running at once on the same Session overwrite or read back the
wrong id. A fresh instance per Call has none of that: nothing but the caller holds a
reference to it.
Server timestamp at the time the request was received.