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)

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

public class ServiceCredentialsSecurityTokenManager : SecurityTokenManager, 
	IEndpointIdentityProvider

NameDescription
System_CAPS_pubmethodServiceCredentialsSecurityTokenManager(ServiceCredentials)

Initializes a new instance of the ServiceCredentialsSecurityTokenManager class based on the ServiceCredentials passed in.

NameDescription
System_CAPS_pubpropertyServiceCredentials

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

NameDescription
System_CAPS_protmethodCreateSecureConversationTokenAuthenticator(RecipientServiceModelSecurityTokenRequirement, Boolean, SecurityTokenResolver)

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

System_CAPS_pubmethodCreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver)
System_CAPS_pubmethodCreateSecurityTokenProvider(SecurityTokenRequirement)
System_CAPS_pubmethodCreateSecurityTokenSerializer(SecurityTokenVersion)

Creates a security token serializer based on the security token version passed in.(Overrides SecurityTokenManager.CreateSecurityTokenSerializer(SecurityTokenVersion).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetIdentityOfSelf(SecurityTokenRequirement)

Gets the EndpointIdentity based on the security token requirement.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodIsIssuedSecurityTokenRequirement(SecurityTokenRequirement)

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

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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

.NET Framework
Available since 3.0

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

Return to top
Show: