SecurityTokenManager.LoadTokenFromSecurityTokenAssertion Method

Loads an security token referenced in a policy assertion into a SecurityToken. Loads a security token from the specified security token policy assertion.

Namespace: Microsoft.Web.Services2.Security.Tokens
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Dim sta As ISecurityTokenAssertion
Dim returnValue As SecurityToken
Dim securityTokenManager1 As SecurityTokenManager
returnValue = securityTokenManager1.LoadTokenFromSecurityTokenAssertion(sta)

Syntax

'Declaration
Public Overridable Function LoadTokenFromSecurityTokenAssertion( _
    ByVal sta As ISecurityTokenAssertion _
) As SecurityToken
public virtual SecurityToken LoadTokenFromSecurityTokenAssertion(
    ISecurityTokenAssertion sta
);
public: SecurityToken^ LoadTokenFromSecurityTokenAssertion(
    ISecurityTokenAssertion^ sta
);
public SecurityToken LoadTokenFromSecurityTokenAssertion(
    ISecurityTokenAssertion sta
);
public function LoadTokenFromSecurityTokenAssertion(
     sta : ISecurityTokenAssertion
) : SecurityToken;

Parameters

Return Value

The SecurityToken that is referenced in the sta parameter. The default implementation returns null .

Return Value

The SecurityToken that is referenced in the assertion, or null if the operation fails.

Remarks

Use the LoadTokenFromSecurityTokenAssertion method to parse the XML elements of policy assertions that reference a security token. That method returns an ISecurityTokenAssertion that can be passed to the LoadTokenFromSecurityTokenAssertion method to create a SecurityToken instance that satisfies the security token policy assertion.

This method is typically only called when WSE calls the GetTokenFromSecurityTokenAssertion method.

Notes to Inheritors: If an exception is thrown by this method, then processing for the current SOAP message will fail.

Remarks

Use the LoadSecurityTokenAssertion method to parse the XML elements of policy assertions that reference a specific security token. That method returns an ISecurityTokenAssertion that can be passed to the LoadTokenFromSecurityTokenAssertion method to create a SecurityToken instance.

When the security token type referenced in the policy assertion is unknown, use the GetTokenFromKeyInfo method.

Notes to Inheritors: If an exception is thrown by this method, then processing for the current SOAP message will fail.

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 Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

SecurityTokenManager Class
Microsoft.Web.Services2.Security.Tokens Namespace
ISecurityTokenAssertion
ISecurityTokenAssertion

Other Resources

SecurityTokenManager Members