SslStream.IsAuthenticated 속성

정의

인증에 Boolean 성공했는지 여부를 나타내는 값을 가져옵니다.

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

속성 값

인증에 성공하면

예제

다음 코드 예제에서는이 속성의 값을 표시 합니다.

static void DisplaySecurityServices(SslStream stream)
{
   Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer);
   Console.WriteLine("IsSigned: {0}", stream.IsSigned);
   Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted);
   Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated);
}
Private Shared Sub DisplaySecurityServices(stream As SslStream)
    Console.WriteLine("Is authenticated: {0} as server? {1}", stream.IsAuthenticated, stream.IsServer)
    Console.WriteLine("IsSigned: {0}", stream.IsSigned)
    Console.WriteLine("Is Encrypted: {0}", stream.IsEncrypted)
    Console.WriteLine("Is mutually authenticated: {0}", stream.IsMutuallyAuthenticated)
End Sub

설명

클라이언트는 또는 AuthenticateAsClient 메서드를 호출하여 인증합니다BeginAuthenticateAsClient. 서버는 또는 AuthenticateAsServer 메서드를 호출하여 인증합니다BeginAuthenticateAsServer.

적용 대상