ServiceCredentialsSecurityTokenManager Class

Definition

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

C#
public class ServiceCredentialsSecurityTokenManager : System.IdentityModel.Selectors.SecurityTokenManager, System.ServiceModel.Security.IEndpointIdentityProvider
Inheritance
ServiceCredentialsSecurityTokenManager
Implements

Examples

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

C#
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);
    }
}

Remarks

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

Constructors

Properties

ServiceCredentials

Gets the service credentials used to construct this instance of this class.

Methods

CreateSecureConversationTokenAuthenticator(RecipientServiceModelSecurityTokenRequirement, Boolean, SecurityTokenResolver)

Creates a secure conversation token authenticator based on the property requirements passed in.

CreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver)

Creates a security token authenticator based on the SecurityTokenRequirement.

CreateSecurityTokenProvider(SecurityTokenRequirement)

Creates a security token provider based on the SecurityTokenRequirement.

CreateSecurityTokenSerializer(SecurityTokenVersion)

Creates a security token serializer based on the security token version passed in.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetIdentityOfSelf(SecurityTokenRequirement)

Gets the EndpointIdentity based on the security token requirement.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
IsIssuedSecurityTokenRequirement(SecurityTokenRequirement)

Determines whether the security token requirement is for an issued token.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1