Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
const DiagnosticInfo = require("node-opcua-data-model").DiagnosticInfo;
const ExtensionObject = require("node-opcua-extension-object").ExtensionObject;
// OPC Unified Architecture, Part 4 $7.27 page 139
const ResponseHeader_Schema = {
name: "ResponseHeader",
fields: [
// The time the Server sent the response.
{ name: "timestamp", fieldType: "UtcTime", defaultValue: function () {
return new Date();
} },
// The requestHandle given by the Client to the request.
{ name: "requestHandle", fieldType: "IntegerId" },
// OPC UA-defined result of the Service invocation.
{ name: "serviceResult", fieldType: "StatusCode" },
"use strict";
const ExtensionObject = require("node-opcua-extension-object").ExtensionObject;
// OPC Unified Architecture, Part 4 $7.27 page 139
const RequestHeader_Schema = {
name: "RequestHeader",
fields: [
// The secret Session identifier used to verify that the request is associated with
// the Session. The SessionAuthenticationToken type is defined in 7.29.
{ name: "authenticationToken", fieldType: "NodeId" },
// The time the Client sent the request.
{ name: "timestamp", fieldType: "UtcTime", defaultValue: function () {
return new Date();
} },
// A requestHandle associated with the request. This client defined handle can
const generator = require("node-opcua-generator");
const getBuildInType = require("node-opcua-extension-object").ExtensionObject;
const ExtensionObject = require("node-opcua-extension-object").ExtensionObject;
generator.registerObject("AsymmetricAlgorithmSecurityHeader");
generator.registerObject("SymmetricAlgorithmSecurityHeader");
generator.registerObject("SequenceHeader");
generator.registerObject("ErrorMessage");
//xx generator.registerObject("DiagnosticInfo");
generator.registerObject("RequestHeader");
generator.registerObject("ResponseHeader");
generator.registerObject("ChannelSecurityToken");
generator.registerObject("SignatureData");
"use strict";
require("node-opcua-extension-object");
require("node-opcua-service-secure-channel");
const ExtensionObject = require("node-opcua-extension-object").ExtensionObject;
const ActivateSessionRequest_Schema = {
documentation: "Activates a session with the server.",
name: "ActivateSessionRequest",
fields: [
{ name:"requestHeader", fieldType:"RequestHeader", documentation:"A standard header included in all requests sent to a server." },
{ name:"clientSignature", fieldType:"SignatureData", documentation:"A signature created with the client certificate from the last server nonce returned by the server." },
{ name:"clientSoftwareCertificates", isArray:true, fieldType:"SignedSoftwareCertificate", documentation:"The software certificates owned by the client." },
{ name:"localeIds", isArray:true, fieldType:"LocaleId", documentation:"The locales to use with the session." },
{ name:"userIdentityToken", fieldType:"ExtensionObject", documentation:"The user identity to use with the session."},
{ name:"userTokenSignature", fieldType:"SignatureData", documentation:"A digital signature created with the user identity token."}
]
};
exports.ActivateSessionRequest_Schema = ActivateSessionRequest_Schema;
const generator = require("node-opcua-generator");
const getBuildInType = require("node-opcua-extension-object").ExtensionObject;
const ExtensionObject = require("node-opcua-extension-object").ExtensionObject;
generator.registerObject("AsymmetricAlgorithmSecurityHeader");
generator.registerObject("SymmetricAlgorithmSecurityHeader");
generator.registerObject("SequenceHeader");
generator.registerObject("ErrorMessage");
//xx generator.registerObject("DiagnosticInfo");
generator.registerObject("RequestHeader");
generator.registerObject("ResponseHeader");
generator.registerObject("ChannelSecurityToken");
generator.registerObject("SignatureData");
generator.registerObject("OpenSecureChannelRequest");