Condividi tramite


SecurityContextToken Constructor (SecurityToken, String)

Initializes a new instance of the SecurityContextToken class using the security token used to sign the Request Security Token (RST), the security token shared by the security token service and the target Web service, and the specified identifier.

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

Usage

'Usage
Dim baseToken As SecurityToken
Dim identifier As String
Dim securityContextToken1 As New SecurityContextToken(baseToken, identifier)

Syntax

'Declaration
Public Sub New( _
    ByVal baseToken As SecurityToken, _
    ByVal identifier As String _
)
public SecurityContextToken(
    SecurityToken baseToken, 
    string identifier
);
public:
SecurityContextToken(
    SecurityToken^ baseToken, 
    String^ identifier
);
public SecurityContextToken(
    SecurityToken baseToken, 
    System.String identifier
);
public function SecurityContextToken(
     baseToken : SecurityToken, 
     identifier : String
);

Parameters

  • baseToken
    The SecurityToken that digitally signed the security token request. If this is null, a SecurityContextToken will be created without a digitally signed security token.
  • identifier
    The string to initialize the Identifier property, which is the unique identifier for the SecurityContextToken .

Remarks

Typically, you do not create a new instance of a SecurityContextToken , but rather you request one from a security token service. For details about requesting a security context token, see How to: Obtain a Security Token From a Security Context Token Service. Use the constructors for this class when you create security token services that issue security tokens deriving from SecurityContextToken .

If the security context token is granted by the security token service, it is returned to the SOAP message sender in a <RequestSecurityTokenResponse> element. The response contains the SecurityContextToken and one or two encrypted keys, depending on whether the Web service to which the SecurityContextToken will be sent (known as the target Web service) and the security token service reside in the same virtual directory. If they do not reside in the same virtual directory, there are two encrypted keys, where one key is encrypted using the baseToken parameter and the other is encrypted using the serviceToken parameter. That way only the SOAP message sender and the security token service can decrypt the keys and use them to sign a SOAP message, verify the signature, encrypt a SOAP message or decrypt the SOAP message.

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

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