SecurityContextTokenManager.LoadTokenFromSecurityTokenAssertion Method

Loads a security context token referenced in a policy assertion into a SecurityContextToken.

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 securityContextTokenManager1 As SecurityContextTokenManager
returnValue = securityContextTokenManager1.LoadTokenFromSecurityTokenAssertion(sta)

Syntax

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

Parameters

Return Value

The SecurityContextToken that is referenced in the sta parameter, or null if no token can be loaded.

Remarks

When the sta parameter is null or does not reference a SecurityContextToken, null is returned.

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

The LoadTokenFromSecurityTokenAssertion method attempts to get the SecurityContextToken referenced in the ISecurityTokenAssertion from the PolicyEnforcementSecurityTokenCache by calling the GetCachedToken method. If the referenced SecurityContextToken is not in that cache, an attempt is made to retrieve the security token from the token issuer by calling the RequestTokenFromIssuer 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

SecurityContextTokenManager Class
Microsoft.Web.Services2.Security.Tokens Namespace
ISecurityTokenAssertion
SecurityContextToken

Other Resources

SecurityContextTokenManager Members