Język

NegotiateStream.IsAuthenticated Właściwość

Definicja

Pobiera wartość wskazującą Boolean , czy uwierzytelnianie zakończyło się pomyślnie.

public:
 virtual property bool IsAuthenticated { bool get(); };
public override bool IsAuthenticated { get; }
member this.IsAuthenticated : bool
Public Overrides ReadOnly Property IsAuthenticated As Boolean

Wartość właściwości

true w przypadku pomyślnego uwierzytelnienia; w przeciwnym razie, false.

Przykłady

W poniższym przykładzie kodu pokazano wartość tej właściwości.

 static void DisplayAuthenticationProperties(NegotiateStream stream)
{
     Console.WriteLine("IsAuthenticated: {0}", stream.IsAuthenticated);
    Console.WriteLine("IsMutuallyAuthenticated: {0}", stream.IsMutuallyAuthenticated);
    Console.WriteLine("IsEncrypted: {0}", stream.IsEncrypted);
    Console.WriteLine("IsSigned: {0}", stream.IsSigned);
    Console.WriteLine("ImpersonationLevel: {0}", stream.ImpersonationLevel);
    Console.WriteLine("IsServer: {0}", stream.IsServer);
}

Uwagi

Klienci uwierzytelniają się, wywołując AuthenticateAsClient metody lub BeginAuthenticateAsClient . Serwery uwierzytelniają się przez wywołanie AuthenticateAsServer metod lub BeginAuthenticateAsServer .

Dotyczy