Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.defineProperty(this._sessionSecurityDiagnostics, "clientCertificate", {
get(this: any) {
const session: ServerSession = this.$session;
return session.channel!.clientCertificate;
}
});
this.sessionSecurityDiagnostics = sessionSecurityDiagnosticsType.instantiate({
browseName: new QualifiedName({ name: "SessionSecurityDiagnostics", namespaceIndex: 0 }),
componentOf: this.sessionObject,
extensionObject: this._sessionSecurityDiagnostics,
minimumSamplingInterval: 2000 // 2 seconds
}) as UASessionSecurityDiagnostics;
ensureObjectIsSecure(this.sessionSecurityDiagnostics);
this._sessionSecurityDiagnostics = this.sessionSecurityDiagnostics.$extensionObject as SessionSecurityDiagnosticsDataTypeEx;
assert(this._sessionSecurityDiagnostics.$session === this);
const sessionSecurityDiagnosticsArray = this.getSessionSecurityDiagnosticsArray();
// add sessionDiagnostics into sessionDiagnosticsArray
const node = addElement(this._sessionSecurityDiagnostics, sessionSecurityDiagnosticsArray);
ensureObjectIsSecure(node);
}
}
browseName: new QualifiedName({ name: "SessionSecurityDiagnostics", namespaceIndex: 0 }),
componentOf: this.sessionObject,
extensionObject: this._sessionSecurityDiagnostics,
minimumSamplingInterval: 2000 // 2 seconds
}) as UASessionSecurityDiagnostics;
ensureObjectIsSecure(this.sessionSecurityDiagnostics);
this._sessionSecurityDiagnostics = this.sessionSecurityDiagnostics.$extensionObject as SessionSecurityDiagnosticsDataTypeEx;
assert(this._sessionSecurityDiagnostics.$session === this);
const sessionSecurityDiagnosticsArray = this.getSessionSecurityDiagnosticsArray();
// add sessionDiagnostics into sessionDiagnosticsArray
const node = addElement(this._sessionSecurityDiagnostics, sessionSecurityDiagnosticsArray);
ensureObjectIsSecure(node);
}
}
sessionsDiagnosticsSummary.getComponentByName("SessionDiagnosticsArray")! as
UADynamicVariableArray;
assert(sessionDiagnosticsArray.nodeClass === NodeClass.Variable);
bindExtObjArrayNode(sessionDiagnosticsArray, "SessionDiagnosticsVariableType", "sessionId");
const varType = addressSpace.findVariableType("SessionSecurityDiagnosticsType");
if (!varType) {
console.log("Warning cannot find SessionSecurityDiagnosticsType variable Type");
} else {
const sessionSecurityDiagnosticsArray =
sessionsDiagnosticsSummary.getComponentByName("SessionSecurityDiagnosticsArray")! as
UADynamicVariableArray;
assert(sessionSecurityDiagnosticsArray.nodeClass === NodeClass.Variable);
bindExtObjArrayNode(sessionSecurityDiagnosticsArray, "SessionSecurityDiagnosticsType", "sessionId");
ensureObjectIsSecure(sessionSecurityDiagnosticsArray);
}
}