Edit

Share via


NegotiateStream.IsAuthenticated Property

Definition

Gets a Boolean value that indicates whether authentication was successful.

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

Property Value

true if successful authentication occurred; otherwise, false.

Examples

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

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

Remarks

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

Applies to