Condividi tramite


SecurityTokenReference Constructor (SecurityToken, SecurityTokenReference.SerializationOptions)

Initializes a new instance of the SecurityTokenReference class using the specified security token and serialization option.

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

Usage

'Usage
Dim token As SecurityToken
Dim options As SecurityTokenReference.SerializationOptions
Dim securityTokenReference1 As New SecurityTokenReference(token, options)

Syntax

'Declaration
Public Sub New( _
    ByVal token As SecurityToken, _
    ByVal options As SecurityTokenReference.SerializationOptions _
)
public SecurityTokenReference(
    SecurityToken token, 
    SecurityTokenReference.SerializationOptions options
);
public:
SecurityTokenReference(
    SecurityToken^ token, 
    SecurityTokenReference.SerializationOptions options
);
public SecurityTokenReference(
    SecurityToken token, 
    SecurityTokenReference.SerializationOptions options
);
public function SecurityTokenReference(
     token : SecurityToken, 
     options : SecurityTokenReference.SerializationOptions
);

Parameters

Remarks

To add an embedded security token to a digital signature:

  1. Create a new instance of the System.Security.Cryptography.Xml.KeyInfo class.

  2. Create a new instance of the SecurityTokenReference class using this constructor. Specify the security token to embed and the Embedded field of the SecurityTokenReference.SerializationOptions enumeration.

  3. Add the SecurityTokenReference to the KeyInfo, using the System.Security.Cryptography.Xml.KeyInfo.AddClause method.

  4. Assign the KeyInfo to the KeyInfo property.

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

SecurityTokenReference Class
SecurityTokenReference Members
Microsoft.Web.Services3.Security Namespace