Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (options.allowAnonymous) {
userIdentityTokens.push({
policyId: "anonymous",
tokenType: UserTokenType.Anonymous,
issuedTokenType: null,
issuerEndpointUrl: null,
securityPolicyUri: null
});
}
// return the endpoint object
const endpoint = new EndpointDescription({
endpointUrl: options.endpointUrl,
server: undefined, // options.server,
serverCertificate: options.serverCertificateChain,
securityMode: options.securityMode,
securityPolicyUri,
userIdentityTokens,
securityLevel: options.securityLevel,
transportProfileUri: default_transportProfileUri
}) as EndpointDescriptionEx;
(endpoint as any).__defineGetter__("endpointUrl", () => {
return resolveFullyQualifiedDomainName(options.endpointUrl);
}
if (options.allowAnonymous) {
userIdentityTokens.push({
policyId: "anonymous",
tokenType: UserTokenType.Anonymous,
issuedTokenType: null,
issuerEndpointUrl: null,
securityPolicyUri: null
});
}
// return the endpoint object
const endpoint = new EndpointDescription({
endpointUrl: options.endpointUrl,
server: undefined, // options.server,
serverCertificate: options.serverCertificateChain,
securityMode: options.securityMode,
securityPolicyUri,
userIdentityTokens,
securityLevel: options.securityLevel,
transportProfileUri: default_transportProfileUri
}) as EndpointDescriptionEx;
(endpoint as any).__defineGetter__("endpointUrl", () => {
return resolveFullyQualifiedDomainName(options.endpointUrl);
securityMode: MessageSecurityMode.None,
securityPolicyUri: "http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15",
userIdentityTokens: [
{
policyId: "policyId",
tokenType: UserTokenType.Anonymous,
issuedTokenType: "issuedTokenType",
issuerEndpointUrl: "qdqsdq",
securityPolicyUri: "String"
}
],
transportProfileUri: "",
securityLevel: 36
};
var value = new EndpointDescription(data);
assert(value.server);
return value;
};