Share via


SecurityToken.VerifySignedTokenXml Method

Verifies the digital signature of a security token that is an XML representation.

Namespace: Microsoft.Web.Services3.Security.Tokens
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim element As XmlElement
Dim throwIfNoSignature As Boolean
Dim securityToken1 As SecurityToken
securityToken1.VerifySignedTokenXml(element, throwIfNoSignature)

Syntax

'Declaration
Public Overridable Sub VerifySignedTokenXml( _
    ByVal element As XmlElement, _
    ByVal throwIfNoSignature As Boolean _
)
public virtual void VerifySignedTokenXml(
    XmlElement element, 
    bool throwIfNoSignature
);
public:
virtual void VerifySignedTokenXml(
    XmlElement^ element,
    bool throwIfNoSignature
);
public virtual void VerifySignedTokenXml(
    XmlElement element, 
    boolean throwIfNoSignature
);
public function VerifySignedTokenXml(
     element : XmlElement, 
     throwIfNoSignature : Boolean
) : Void;

Parameters

  • element
    The XmlElement containing the digitally signed security token.
  • throwIfNoSignature
    true to throw an exception when the security token is not digitally signed; otherwise, false.

Exceptions

Exception type Condition
SecurityFault

element contains a security token that has not been digitally signed.

-or-

the digital signature in element is not valid.

Remarks

Use the GetSignedTokenXml and VerifySignedTokenXml methods when you send and receive SOAP messages containing digitally signed security tokens. When sending a SOAP message, use the GetSignedTokenXml to generate the XML representation of a digitally signed security token. When a SOAP message is received that contains the XML representation of a digitally signed security token, use the VerifySignedTokenXml to verify the signature.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

SecurityToken Class
SecurityToken Members
Microsoft.Web.Services3.Security.Tokens Namespace