ClientCredentialsSecurityTokenManager Classe

Définition

Gère les jetons de sécurité pour le client.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
Héritage
ClientCredentialsSecurityTokenManager

Exemples

Le code suivant montre comment substituer cette classe pour créer un gestionnaire de jeton de sécurité et d'informations d'identifications de client personnalisé.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

Remarques

Cette classe gère la sérialisation, la fourniture et l'authentification des jetons de sécurité pour le client.This class handles security token serialization, security token provision and security token authentication for the client. Il existe une instance de cette classe pour chaque fabrique de canal client.There is one instance of this class for each client channel factory.

Constructeurs

ClientCredentialsSecurityTokenManager(ClientCredentials)

Initialise une nouvelle instance de la classe ClientCredentialsSecurityTokenManager.Initializes a new instance of the ClientCredentialsSecurityTokenManager class.

Propriétés

ClientCredentials

Obtient les informations d'identification du client.Gets the client credentials.

Méthodes

CreateSecurityTokenAuthenticator(SecurityTokenRequirement, SecurityTokenResolver)

Crée un authentificateur de jeton de sécurité.Creates a security token authenticator.

CreateSecurityTokenProvider(SecurityTokenRequirement)

Crée un fournisseur de jeton de sécurité.Creates a security token provider.

CreateSecurityTokenSerializer(SecurityTokenVersion)

Crée un sérialiseur de jeton de sécurité.Creates a security token serializer.

CreateSecurityTokenSerializer(SecurityVersion)

Crée un sérialiseur de jeton de sécurité.Creates a security token serializer.

Equals(Object)

Détermine si l'objet spécifié est égal à l'objet actuel.Determines whether the specified object is equal to the current object.

(Hérité de Object)
GetHashCode()

Sert de fonction de hachage par défaut.Serves as the default hash function.

(Hérité de Object)
GetType()

Obtient le Type de l'instance actuelle.Gets the Type of the current instance.

(Hérité de Object)
IsIssuedSecurityTokenRequirement(SecurityTokenRequirement)

Obtient une valeur qui indique si l’exigence de jeton spécifiée est une exigence de jeton de sécurité émis.Gets a value that indicates whether the specified token requirement is an issued security token requirement.

MemberwiseClone()

Crée une copie superficielle du Object actuel.Creates a shallow copy of the current Object.

(Hérité de Object)
ToString()

Retourne une chaîne qui représente l'objet en cours.Returns a string that represents the current object.

(Hérité de Object)

S’applique à