ServiceCredentialsSecurityTokenManager Clase

Definición

Representa una implementación SecurityTokenManager proporcionada por los serializadores del token de seguridad basada en ServiceCredentials el servicio onfigurado.Represents a SecurityTokenManager implementation that provides security token serializers based on the ServiceCredentials configured on the service.

public ref class ServiceCredentialsSecurityTokenManager : System::IdentityModel::Selectors::SecurityTokenManager, System::ServiceModel::Security::IEndpointIdentityProvider
public class ServiceCredentialsSecurityTokenManager : System.IdentityModel.Selectors.SecurityTokenManager, System.ServiceModel.Security.IEndpointIdentityProvider
type ServiceCredentialsSecurityTokenManager = class
    inherit SecurityTokenManager
    interface IEndpointIdentityProvider
Public Class ServiceCredentialsSecurityTokenManager
Inherits SecurityTokenManager
Implements IEndpointIdentityProvider
Herencia
ServiceCredentialsSecurityTokenManager
Implementaciones

Ejemplos

El siguiente código muestra cómo invalidar esta clase para crear un Administrador de token de credenciales de servicio personalizado.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);
    }
}
Friend Class MyServiceCredentialsSecurityTokenManager
    Inherits ServiceCredentialsSecurityTokenManager
    Private credentials As MyServiceCredentials

    Public Sub New(ByVal credentials As MyServiceCredentials) 
        MyBase.New(credentials)
        Me.credentials = credentials
    
    End Sub
    
    
    Public Overrides Function CreateSecurityTokenProvider(ByVal tokenRequirement As SecurityTokenRequirement) _
    As SecurityTokenProvider
        ' Return your implementation of SecurityTokenProvider, if required.
        ' This implementation delegates to the base class.
        Return MyBase.CreateSecurityTokenProvider(tokenRequirement)

    End Function

    Public Overrides Function CreateSecurityTokenAuthenticator( _
    ByVal tokenRequirement As SecurityTokenRequirement, _
    ByRef outOfBandTokenResolver As SecurityTokenResolver) _
    As SecurityTokenAuthenticator
        ' Return your implementation of SecurityTokenProvider, if required.
        ' This implementation delegates to the base class.
        Return MyBase.CreateSecurityTokenAuthenticator(tokenRequirement, outOfBandTokenResolver)

    End Function
    
    
    Public Overrides Function CreateSecurityTokenSerializer(ByVal version As SecurityTokenVersion) _
    As SecurityTokenSerializer
        ' Return your implementation of SecurityTokenProvider, if required.
        ' This implementation delegates to the base class.
        Return MyBase.CreateSecurityTokenSerializer(version)

    End Function
End Class

Comentarios

Esta clase crea instancias de la clase SecurityTokenSerializer.This class creates instances of the SecurityTokenSerializer class. Hay una instancia de esta clase para cada agente de escucha de canal de servicio.There is one instance of this class for each service channel listener.

Constructores

ServiceCredentialsSecurityTokenManager(ServiceCredentials)

Inicializa una nueva instancia de la clase ServiceCredentialsSecurityTokenManager basándose en la clase ServiceCredentials que se haya pasado.Initializes a new instance of the ServiceCredentialsSecurityTokenManager class based on the ServiceCredentials passed in.

Propiedades

ServiceCredentials

Obtiene las credenciales del servicio utilizadas para construir esta instancia de esta clase.Gets the service credentials used to construct this instance of this class.

Métodos

CreateSecureConversationTokenAuthenticator(RecipientServiceModelSecurityTokenRequirement, Boolean, SecurityTokenResolver)

Crea un autenticador de token de conversación seguro basado en los requisitos de propiedad pasados.Creates a secure conversation token authenticator based on the property requirements passed in.

CreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver)

Crea un autenticador de tokens de seguridad basado en SecurityTokenRequirement.Creates a security token authenticator based on the SecurityTokenRequirement.

CreateSecurityTokenProvider(SecurityTokenRequirement)

Crea un proveedor de tokens de seguridad basado en SecurityTokenRequirement.Creates a security token provider based on the SecurityTokenRequirement.

CreateSecurityTokenSerializer(SecurityTokenVersion)

Crea un serializador de tokens de seguridad basado en la versión del token de seguridad que se pasó.Creates a security token serializer based on the security token version passed in.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Heredado de Object)
GetIdentityOfSelf(SecurityTokenRequirement)

Obtiene EndpointIdentity basado en el requisito de token de seguridad.Gets the EndpointIdentity based on the security token requirement.

GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Heredado de Object)
IsIssuedSecurityTokenRequirement(SecurityTokenRequirement)

Determina si el requisito de token de seguridad es para un token emitido.Determines whether the security token requirement is for an issued token.

MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Heredado de Object)

Se aplica a