Export (0) Print
Expand All

ServiceCredentialsSecurityTokenManager Class

Represents a SecurityTokenManager implementation that provides security token serializers based on the ServiceCredentials configured on the service.

Namespace:  System.ServiceModel.Security
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public class ServiceCredentialsSecurityTokenManager : SecurityTokenManager, 
	IEndpointIdentityProvider

This class creates instances of the SecurityTokenSerializer class. There is one instance of this class for each service channel listener.

The following code shows how to override this class to create a customized Service Credentials Token Manager.

internal class MyServiceCredentialsSecurityTokenManager : 
    ServiceCredentialsSecurityTokenManager
{
    MyServiceCredentials credentials;

    public MyServiceCredentialsSecurityTokenManager(MyServiceCredentials credentials)
        : base(credentials)
    {
        this.credentials = credentials;
    }

    public override SecurityTokenProvider CreateSecurityTokenProvider(SecurityTokenRequirement tokenRequirement)
    {
        // Return your implementation of SecurityTokenProvider, if required. 
        // This implementation delegates to the base class. 
        return base.CreateSecurityTokenProvider(tokenRequirement);
    }

    public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator(SecurityTokenRequirement tokenRequirement, out SecurityTokenResolver outOfBandTokenResolver)
    {
        // Return your implementation of SecurityTokenProvider, if required. 
        // This implementation delegates to the base class. 
        return base.CreateSecurityTokenAuthenticator(tokenRequirement, out outOfBandTokenResolver);
    }

    public override SecurityTokenSerializer CreateSecurityTokenSerializer(SecurityTokenVersion version)
    {
        // Return your implementation of SecurityTokenProvider, if required. 
        // This implementation delegates to the base class. 
        return base.CreateSecurityTokenSerializer(version);
    }
}

System.Object
  System.IdentityModel.Selectors.SecurityTokenManager
    System.ServiceModel.Security.ServiceCredentialsSecurityTokenManager

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft