Bagikan melalui


NegotiateStream.IsAuthenticated Properti

Definisi

Boolean Mendapatkan nilai yang menunjukkan apakah autentikasi berhasil.

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

Nilai Properti

true jika autentikasi berhasil terjadi; jika tidak, false.

Contoh

Contoh kode berikut menunjukkan menampilkan nilai properti ini.

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


 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);
}

Keterangan

Klien mengautentikasi dengan memanggil AuthenticateAsClient metode atau BeginAuthenticateAsClient . Server mengautentikasi dengan memanggil AuthenticateAsServer metode atau BeginAuthenticateAsServer .

Berlaku untuk