Home > Class Reference > %SYS namespace > %SOAP.Security.Header

%SOAP.Security.Header

class %SOAP.Security.Header extends %SOAP.Header

OASIS Web Services Security SOAP header.

Parameters

parameter NAMESPACE = http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd;
Inherited description: NAMESPACE specifies the XML namespace to be used when projecting the class to XML. If NAMESPACE = "", the default namespace is used for the XML schema is used as the namespace for his class.
parameter XMLFORMAT = literal;
Inherited description: The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport methods for XML enabled classes to include code for only literal or only encoded format. This allows the generated routines to be significantly smaller since usually both formats are not needed.
If XMLFORMAT="Literal", then only support for literal format import and export is generated.
If XMLFORMAT="Encoded", then only support for SOAP encoded format import and export is generated.
The default is to generate support for both literal and encoded format.
parameter XMLTYPE = Security;
Inherited description: This parameter provides the default XMLTYPE for the class. If it is empty then the class name will be used to construct a default XML type. The default XMLTYPE is used when naming and referencing this type in a schema and the schema context did not provide an XML type name.

Properties

property Namespace as %String);
The actual XML namespace for this header
Property methods: NamespaceDisplayToLogical(), NamespaceGet(), NamespaceIsValid(), NamespaceLogicalToDisplay(), NamespaceLogicalToOdbc(), NamespaceNormalize(), NamespaceSet()
property SecurityContextToken as %SOAP.WSSC.SecurityContextToken (XMLPROJECTION = "none");
The SecurityContextToken obtained from the received Security header while the SecurityContextToken is being validated. This token may be used in the response.
Property methods: SecurityContextTokenGet(), SecurityContextTokenGetSwizzled(), SecurityContextTokenIsValid(), SecurityContextTokenNewObject(), SecurityContextTokenSet()
property Signature as %XML.Security.Signature (XMLPROJECTION = "none");
If the Security header has a Signature, then the %XML.Security.Signature instance instance corresponding to the signature is stored here.
Property methods: SignatureGet(), SignatureGetSwizzled(), SignatureIsValid(), SignatureNewObject(), SignatureSet()
property UsernameToken as %SOAP.Security.UsernameToken (XMLPROJECTION = "none");
The UsernameToken which was in an imported Security header
Property methods: UsernameTokenGet(), UsernameTokenGetSwizzled(), UsernameTokenIsValid(), UsernameTokenNewObject(), UsernameTokenSet()

Methods

method AddSecurityElement(element As %SOAP.Security.Element, position="") as %Status [ Language = objectscript ]
Add an element to the Security header.
If position is specified as a %SOAP.Security.Element subclass, then the element is added after this element. Otherwise, position is the %Integer position at which to the element is added. If position=-1, then the element is added after all elements.
If position is not specified, the position depends on which type of element is added. Token elements are those which do not specify signature (Signature) or encryption (ReferenceList or EncryptedKey with ReferenceList) are added after all previously added token elements. The exception is the Timestamp element always goes first.
If any tokens which are to be encrypted are added, they should be added after the EncryptedKey element is added and should be postioned after the EncryptedKey specified as the position argument.
Elements which specify signature (Signature) or encryption (ReferenceList or EncryptedKey with ReferenceList) are added following all tokens elements and thus before all other non-token elements.
This method replaces the deprecated methods AddToken and AddElement. There is no need to modify existing code, but if you choose to do so, you can simply replace references to AddToken and AddElement with references to AddSecurityToken. It is not necessary to adjust the argument lists.
method FindByEncryptedKeySHA1(encryptedKeySHA1 As %Binary) as %SOAP.Security.Element [ Language = objectscript ]
Find the key from an EncryptedKey element which corresponds to the EncryptedKeySHA1 argument. Return the key if found, else "".
method FindElement(type As %String, ByRef pos As %String) as %SOAP.Security.Element [ Language = objectscript ]
Find the first security element of the specified type after position pos and return the element. Return "" if no element of the specified type is found. Types are Timestamp, BinarySecurityToken, UsernameToken, Signature, SignatureConfirmation, EncryptedKey.
method FindEncryptedKey(usedAsSigningKey As %Boolean) as %XML.Security.EncryptedKey [ Language = objectscript ]
Find an EncryptedKey element. Return the key if found, else "".
method FindLastElement(type As %String, ByRef pos As %String) as %SOAP.Security.Element [ Language = objectscript ]
Find the last security element of the specified type and return the element. Return "" if no element of the specified type is found. Types are Timestamp, BinarySecurityToken, UsernameToken, Signature, SignatureConfirmation, EncryptedKey.
classmethod GetSecurityNamespace() [ Language = objectscript ]
Return the default WS-Security namespace
classmethod IsSecurityNamespace(namespace As %String) as %Boolean [ Language = objectscript ]
Return true if the specified namespace is a valid namespace for a WS-Security header

Inherited Methods

%AddToSaveSet() %Extends() %SetModified()
%ClassIsLatestVersion() %GetParameter() %ValidateObject()
%ClassName() %IsA() GetId()
%ConstructClone() %IsModified() XMLDTD()
%DispatchClassMethod() %New() XMLExport()
%DispatchGetModified() %NormalizeObject() XMLExportToStream()
%DispatchGetProperty() %ObjectModified() XMLExportToString()
%DispatchMethod() %OriginalNamespace() XMLNew()
%DispatchSetModified() %PackageName() XMLSchema()
%DispatchSetMultidimProperty() %RemoveFromSaveSet() XMLSchemaNamespace()
%DispatchSetProperty() %SerializeObject() XMLSchemaType()