SslStream::IsAuthenticated Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a Boolean value that indicates whether authentication was successful.

Namespace:   System.Net.Security
Assembly:  System (in System.dll)

public:
property bool IsAuthenticated {
	virtual bool get() override;
}

Property Value

Type: System::Boolean

true if successful authentication occurred; otherwise, false.

Clients authenticate by calling the AuthenticateAsClient or BeginAuthenticateAsClient methods. Servers authenticate by calling the AuthenticateAsServer or BeginAuthenticateAsServer methods.

The following code example demonstrates displaying the value of this property.

static void DisplaySecurityServices( SslStream^ stream )
{
   Console::WriteLine( L"Is authenticated: {0} as server? {1}", stream->IsAuthenticated, stream->IsServer );
   Console::WriteLine( L"IsSigned: {0}", stream->IsSigned );
   Console::WriteLine( L"Is Encrypted: {0}", stream->IsEncrypted );
}


.NET Framework
Available since 2.0
Return to top
Show: