NegotiateStream.IsMutuallyAuthenticated 属性

定义

获取一个 Boolean 值,该值指示服务器和客户端是否均已进行身份验证。Gets a Boolean value that indicates whether both the server and the client have been authenticated.

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

属性值

Boolean

如果服务器已进行身份验证,则为 true;否则为 falsetrue if the server has been authenticated; otherwise, false.

示例

下面的代码示例演示如何显示此属性的值。The following code example demonstrates displaying the value of this property.

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

注解

当客户端希望服务器提供凭据以进行身份验证时,客户端将指定相互身份验证。Mutual authentication is specified by the client when the client wants the server to provide credentials for authentication. 默认情况下,客户端请求相互身份验证。By default, clients request mutual authentication.

协商协议根据客户端和服务器支持的安全协议选择 NTLM 或 Kerberos。The Negotiate protocol selects either NTLM or Kerberos depending on the security protocols supported by the client and server. NTLM 不支持相互身份验证。NTLM does not support mutual authentication.

适用于