ServiceCredentialsSecurityTokenManager Clase

Definición

Representa una implementación SecurityTokenManager proporcionada por los serializadores del token de seguridad basada en ServiceCredentials el servicio onfigurado.

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.

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. Hay una instancia de esta clase para cada agente de escucha de canal de servicio.

Constructores

ServiceCredentialsSecurityTokenManager(ServiceCredentials)

Inicializa una nueva instancia de la clase ServiceCredentialsSecurityTokenManager basándose en la clase ServiceCredentials que se haya pasado.

Propiedades

ServiceCredentials

Obtiene las credenciales del servicio utilizadas para construir esta instancia de esta clase.

Métodos

CreateSecureConversationTokenAuthenticator(RecipientServiceModelSecurityTokenRequirement, Boolean, SecurityTokenResolver)

Crea un autenticador de token de conversación seguro basado en los requisitos de propiedad pasados.

CreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver)

Crea un autenticador de tokens de seguridad basado en SecurityTokenRequirement.

CreateSecurityTokenProvider(SecurityTokenRequirement)

Crea un proveedor de tokens de seguridad basado en SecurityTokenRequirement.

CreateSecurityTokenSerializer(SecurityTokenVersion)

Crea un serializador de tokens de seguridad basado en la versión del token de seguridad que se pasó.

Equals(Object)

Determina si el objeto especificado es igual que el objeto actual.

(Heredado de Object)
GetHashCode()

Sirve como la función hash predeterminada.

(Heredado de Object)
GetIdentityOfSelf(SecurityTokenRequirement)

Obtiene EndpointIdentity basado en el requisito de token de seguridad.

GetType()

Obtiene el Type de la instancia actual.

(Heredado de Object)
IsIssuedSecurityTokenRequirement(SecurityTokenRequirement)

Determina si el requisito de token de seguridad es para un token emitido.

MemberwiseClone()

Crea una copia superficial del Object actual.

(Heredado de Object)
ToString()

Devuelve una cadena que representa el objeto actual.

(Heredado de Object)

Se aplica a