ClientCredentialsSecurityTokenManager Clase

Definición

Administra los tokens de seguridad para el cliente.Manages security tokens for the client.

public ref class ClientCredentialsSecurityTokenManager : System::IdentityModel::Selectors::SecurityTokenManager
public class ClientCredentialsSecurityTokenManager : System.IdentityModel.Selectors.SecurityTokenManager
type ClientCredentialsSecurityTokenManager = class
    inherit SecurityTokenManager
Public Class ClientCredentialsSecurityTokenManager
Inherits SecurityTokenManager
Herencia
ClientCredentialsSecurityTokenManager
Derivado

Ejemplos

El código siguiente muestra cómo puede invalidar esta clase para crear un administrador personalizado de tokens de seguridad de credenciales en el cliente.The following code shows how you can override this class to create a custom Client Credentials Security Token Manager.

internal class MyClientCredentialsSecurityTokenManager :
    ClientCredentialsSecurityTokenManager
{
    MyClientCredentials credentials;

    public MyClientCredentialsSecurityTokenManager(MyClientCredentials credentials)
        : base(credentials)
    {
        this.credentials = credentials;
    }

    public override SecurityTokenProvider CreateSecurityTokenProvider(
        SecurityTokenRequirement tokenRequirement)
    {
        // Return your implementation of the 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 the SecurityTokenAuthenticator, 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 the SecurityTokenSerializer, if required.
        // This implementation delegates to the base class.
        return base.CreateSecurityTokenSerializer(version);
    }
}

Friend Class MyClientCredentialsSecurityTokenManager
    Inherits ClientCredentialsSecurityTokenManager
    Private credentials As MyClientCredentials
    
    
    Public Sub New(ByVal credentials As MyClientCredentials) 
        MyBase.New(credentials)
        Me.credentials = credentials
    
    End Sub
    
    
    Public Overrides Function CreateSecurityTokenProvider( _
    ByVal tokenRequirement As SecurityTokenRequirement) As SecurityTokenProvider
        ' Return your implementation of the 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 the SecurityTokenAuthenticator, 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 the SecurityTokenSerializer, if required.
        ' This implementation delegates to the base class.
        Return MyBase.CreateSecurityTokenSerializer(version)

    End Function
End Class

Comentarios

Esta clase administra la serialización, la disposición y la autenticación del token de seguridad para el cliente.This class handles security token serialization, security token provision and security token authentication for the client. Hay una instancia de esta clase para cada generador de canales en el cliente.There is one instance of this class for each client channel factory.

Constructores

ClientCredentialsSecurityTokenManager(ClientCredentials)

Inicializa una nueva instancia de la clase ClientCredentialsSecurityTokenManager.Initializes a new instance of the ClientCredentialsSecurityTokenManager class.

Propiedades

ClientCredentials

Obtiene las credenciales del cliente.Gets the client credentials.

Métodos

CreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver)

Crea un autenticador de tokens de seguridad.Creates a security token authenticator.

CreateSecurityTokenProvider(SecurityTokenRequirement)

Crea un proveedor de tokens de seguridad.Creates a security token provider.

CreateSecurityTokenSerializer(SecurityTokenVersion)

Crea un serializador de tokens de seguridad.Creates a security token serializer.

CreateSecurityTokenSerializer(SecurityVersion)

Crea un serializador de tokens de seguridad.Creates a security token serializer.

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)
GetType()

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

(Heredado de Object)
IsIssuedSecurityTokenRequirement(SecurityTokenRequirement)

Obtiene un valor que indica si el requisito de token especificado es un requisito de token de seguridad emitido.Gets a value that indicates whether the specified token requirement is an issued security token requirement.

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