NegotiateStream.AuthenticateAsClientAsync 메서드

정의

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다.

오버로드

AuthenticateAsClientAsync()

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다.

AuthenticateAsClientAsync(NetworkCredential, String)

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스에는 지정된 클라이언트 자격 증명이 사용됩니다.

AuthenticateAsClientAsync(NetworkCredential, ChannelBinding, String)

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스에는 지정된 클라이언트 자격 증명과 채널 바인딩이 사용됩니다.

AuthenticateAsClientAsync(NetworkCredential, String, ProtectionLevel, TokenImpersonationLevel)

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스는 지정된 자격 증명과 인증 옵션을 사용합니다.

AuthenticateAsClientAsync(NetworkCredential, ChannelBinding, String, ProtectionLevel, TokenImpersonationLevel)

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스에는 지정된 자격 증명, 인증 옵션 및 채널 바인딩이 사용됩니다.

AuthenticateAsClientAsync()

Source:
NegotiateStream.cs
Source:
NegotiateStream.cs
Source:
NegotiateStream.cs

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsClientAsync();
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync ();
abstract member AuthenticateAsClientAsync : unit -> System.Threading.Tasks.Task
override this.AuthenticateAsClientAsync : unit -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsClientAsync () As Task

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

이 개체가 닫힌 경우.

인증이 이미 발생한 경우.

또는

이전에 이 스트림을 사용하여 서버로 인증을 시도한 경우. 해당 스트림을 사용하여 클라이언트로 인증을 다시 시도할 수는 없습니다.

설명

인증은 클라이언트의 DefaultCredentials를 사용합니다. 서버에 대해 SPN(서비스 사용자 이름)이 지정되지 않았습니다. 가장 수준은 이 Identification고, 보안 수준은 이며 EncryptAndSign상호 인증이 요청됩니다. 클래스는 NegotiateStream 상호 인증에 사용되는 SPN을 생성합니다.

인증에 성공하면 및 IsSigned 속성을 검사 IsEncrypted 에서 사용되는 NegotiateStream보안 서비스를 결정해야 합니다. IsMutuallyAuthenticated 속성을 확인하여 상호 인증이 발생했는지 여부를 확인합니다.

인증에 실패하면 또는 를 AuthenticationExceptionInvalidCredentialException받게 됩니다. 이 경우 다른 자격 증명을 사용하여 인증을 다시 시도할 수 있습니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsClient()된 예외를 참조하세요.

적용 대상

AuthenticateAsClientAsync(NetworkCredential, String)

Source:
NegotiateStream.cs
Source:
NegotiateStream.cs
Source:
NegotiateStream.cs

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스에는 지정된 클라이언트 자격 증명이 사용됩니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsClientAsync(System::Net::NetworkCredential ^ credential, System::String ^ targetName);
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync (System.Net.NetworkCredential credential, string targetName);
abstract member AuthenticateAsClientAsync : System.Net.NetworkCredential * string -> System.Threading.Tasks.Task
override this.AuthenticateAsClientAsync : System.Net.NetworkCredential * string -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsClientAsync (credential As NetworkCredential, targetName As String) As Task

매개 변수

credential
NetworkCredential

클라이언트의 ID를 설정하는 데 사용되는 NetworkCredential입니다.

targetName
String

인증할 서버를 고유하게 식별하는 SPN(서비스 사용자 이름)입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

이 개체가 닫힌 경우.

인증이 이미 발생한 경우.

또는

이전에 이 스트림을 사용하여 서버로 인증을 시도한 경우. 해당 스트림을 사용하여 클라이언트로 인증을 다시 시도할 수는 없습니다.

targetName이(가) null인 경우

설명

가장 수준은 이 Identification고, 보안 수준은 이며 EncryptAndSign상호 인증이 요청됩니다. 클래스는 NegotiateStream 상호 인증에 사용되는 SPN을 생성합니다.

인증에 성공하면 및 IsSigned 속성을 검사 IsEncrypted 에서 사용되는 NegotiateStream보안 서비스를 결정해야 합니다. IsMutuallyAuthenticated 속성을 확인하여 상호 인증이 발생했는지 여부를 확인합니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsClient(NetworkCredential, String)된 예외를 참조하세요.

적용 대상

AuthenticateAsClientAsync(NetworkCredential, ChannelBinding, String)

Source:
NegotiateStream.cs
Source:
NegotiateStream.cs
Source:
NegotiateStream.cs

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스에는 지정된 클라이언트 자격 증명과 채널 바인딩이 사용됩니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsClientAsync(System::Net::NetworkCredential ^ credential, System::Security::Authentication::ExtendedProtection::ChannelBinding ^ binding, System::String ^ targetName);
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync (System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding? binding, string targetName);
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync (System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName);
abstract member AuthenticateAsClientAsync : System.Net.NetworkCredential * System.Security.Authentication.ExtendedProtection.ChannelBinding * string -> System.Threading.Tasks.Task
override this.AuthenticateAsClientAsync : System.Net.NetworkCredential * System.Security.Authentication.ExtendedProtection.ChannelBinding * string -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsClientAsync (credential As NetworkCredential, binding As ChannelBinding, targetName As String) As Task

매개 변수

credential
NetworkCredential

클라이언트의 ID를 설정하는 데 사용되는 NetworkCredential입니다.

binding
ChannelBinding

확장 보호에 사용되는 ChannelBinding입니다.

targetName
String

인증할 서버를 고유하게 식별하는 SPN(서비스 사용자 이름)입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

targetNamenull입니다.

또는

credential이(가) null인 경우

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 이미 발생한 경우.

또는

이전에 이 스트림을 사용하여 서버로 인증을 시도한 경우. 해당 스트림을 사용하여 클라이언트로 인증을 다시 시도할 수는 없습니다.

이 개체가 닫힌 경우.

설명

가장 수준은 이 Identification고, 보안 수준은 이며 EncryptAndSign상호 인증이 요청됩니다. 클래스는 NegotiateStream 상호 인증에 사용되는 SPN을 생성합니다.

ChannelBinding 이 메서드에 전달 되는 확장 된 보호에 사용 합니다 binding 매개 변수에서 애플리케이션에 의해 검색 되 TransportContext 연결 된 속성 SslStream합니다.

인증에 성공하면 및 IsSigned 속성을 검사 IsEncrypted 에서 사용되는 NegotiateStream보안 서비스를 결정해야 합니다. IsMutuallyAuthenticated 속성을 확인하여 상호 인증이 발생했는지 여부를 확인합니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsClient(NetworkCredential, ChannelBinding, String)된 예외를 참조하세요.

추가 정보

적용 대상

AuthenticateAsClientAsync(NetworkCredential, String, ProtectionLevel, TokenImpersonationLevel)

Source:
NegotiateStream.cs
Source:
NegotiateStream.cs
Source:
NegotiateStream.cs

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스는 지정된 자격 증명과 인증 옵션을 사용합니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsClientAsync(System::Net::NetworkCredential ^ credential, System::String ^ targetName, System::Net::Security::ProtectionLevel requiredProtectionLevel, System::Security::Principal::TokenImpersonationLevel allowedImpersonationLevel);
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync (System.Net.NetworkCredential credential, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel);
abstract member AuthenticateAsClientAsync : System.Net.NetworkCredential * string * System.Net.Security.ProtectionLevel * System.Security.Principal.TokenImpersonationLevel -> System.Threading.Tasks.Task
override this.AuthenticateAsClientAsync : System.Net.NetworkCredential * string * System.Net.Security.ProtectionLevel * System.Security.Principal.TokenImpersonationLevel -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsClientAsync (credential As NetworkCredential, targetName As String, requiredProtectionLevel As ProtectionLevel, allowedImpersonationLevel As TokenImpersonationLevel) As Task

매개 변수

credential
NetworkCredential

클라이언트의 ID를 설정하는 데 사용되는 NetworkCredential입니다.

targetName
String

인증할 서버를 고유하게 식별하는 SPN(서비스 사용자 이름)입니다.

requiredProtectionLevel
ProtectionLevel

스트림의 보안 서비스를 나타내는 ProtectionLevel 값 중 하나입니다.

allowedImpersonationLevel
TokenImpersonationLevel

서버에서 클라이언트의 자격 증명을 사용하여 리소스에 액세스하는 방법을 나타내는 TokenImpersonationLevel 값 중 하나입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

allowedImpersonationLevel은(는) 올바른 값이 아닙니다.

targetName가 null입니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

이 개체가 닫힌 경우.

인증이 이미 발생한 경우.

또는

이전에 이 스트림을 사용하여 서버로 인증을 시도한 경우. 해당 스트림을 사용하여 클라이언트로 인증을 다시 시도할 수는 없습니다.

설명

매개 변수를 requiredProtectionLevel 사용하여 인증된 스트림을 사용하여 전송되는 데이터에 대한 보안 서비스를 요청합니다. 예를 들어 데이터를 암호화하고 서명하려면 값을 지정합니다 EncryptAndSign . 인증에 성공한다고 해서 요청 ProtectionLevel 된 가 부여되었음을 보장하지는 않습니다. 및 IsSigned 속성을 검사 IsEncrypted 에서 사용되는 NegotiateStream보안 서비스를 결정해야 합니다.

인증에 실패하면 또는 를 AuthenticationExceptionInvalidCredentialException받게 됩니다. 이 경우 다른 자격 증명을 사용하여 인증을 다시 시도할 수 있습니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsClient(NetworkCredential, String, ProtectionLevel, TokenImpersonationLevel)된 예외를 참조하세요.

적용 대상

AuthenticateAsClientAsync(NetworkCredential, ChannelBinding, String, ProtectionLevel, TokenImpersonationLevel)

Source:
NegotiateStream.cs
Source:
NegotiateStream.cs
Source:
NegotiateStream.cs

클라이언트-서버 연결에서 클라이언트를 인증하고 선택적으로 서버를 인증하는 비동기 작업으로 클라이언트에 의해 호출됩니다. 인증 프로세스에는 지정된 자격 증명, 인증 옵션 및 채널 바인딩이 사용됩니다.

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsClientAsync(System::Net::NetworkCredential ^ credential, System::Security::Authentication::ExtendedProtection::ChannelBinding ^ binding, System::String ^ targetName, System::Net::Security::ProtectionLevel requiredProtectionLevel, System::Security::Principal::TokenImpersonationLevel allowedImpersonationLevel);
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync (System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding? binding, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel);
public virtual System.Threading.Tasks.Task AuthenticateAsClientAsync (System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ChannelBinding binding, string targetName, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel allowedImpersonationLevel);
abstract member AuthenticateAsClientAsync : System.Net.NetworkCredential * System.Security.Authentication.ExtendedProtection.ChannelBinding * string * System.Net.Security.ProtectionLevel * System.Security.Principal.TokenImpersonationLevel -> System.Threading.Tasks.Task
override this.AuthenticateAsClientAsync : System.Net.NetworkCredential * System.Security.Authentication.ExtendedProtection.ChannelBinding * string * System.Net.Security.ProtectionLevel * System.Security.Principal.TokenImpersonationLevel -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsClientAsync (credential As NetworkCredential, binding As ChannelBinding, targetName As String, requiredProtectionLevel As ProtectionLevel, allowedImpersonationLevel As TokenImpersonationLevel) As Task

매개 변수

credential
NetworkCredential

클라이언트의 ID를 설정하는 데 사용되는 NetworkCredential입니다.

binding
ChannelBinding

확장 보호에 사용되는 ChannelBinding입니다.

targetName
String

인증할 서버를 고유하게 식별하는 SPN(서비스 사용자 이름)입니다.

requiredProtectionLevel
ProtectionLevel

스트림의 보안 서비스를 나타내는 ProtectionLevel 값 중 하나입니다.

allowedImpersonationLevel
TokenImpersonationLevel

서버에서 클라이언트의 자격 증명을 사용하여 리소스에 액세스하는 방법을 나타내는 TokenImpersonationLevel 값 중 하나입니다.

반환

비동기 작업(operation)을 나타내는 작업(task) 개체입니다.

예외

targetNamenull입니다.

또는

credential이(가) null인 경우

allowedImpersonationLevel은(는) 올바른 값이 아닙니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 실패한 경우. 이 개체를 사용하여 인증을 다시 시도할 수 있습니다.

인증이 이미 발생한 경우.

또는

이전에 이 스트림을 사용하여 서버로 인증을 시도한 경우. 해당 스트림을 사용하여 클라이언트로 인증을 다시 시도할 수는 없습니다.

이 개체가 닫힌 경우.

설명

매개 변수를 requiredProtectionLevel 사용하여 인증된 스트림을 사용하여 전송되는 데이터에 대한 보안 서비스를 요청합니다. 예를 들어 데이터를 암호화하고 서명하려면 값을 지정합니다 EncryptAndSign . 인증에 성공한다고 해서 요청 ProtectionLevel 된 가 부여되었음을 보장하지는 않습니다. 및 IsSigned 속성을 검사 IsEncrypted 에서 사용되는 NegotiateStream보안 서비스를 결정해야 합니다.

ChannelBinding 이 메서드에 전달 되는 확장 된 보호에 사용 합니다 binding 매개 변수에서 애플리케이션에 의해 검색 되 TransportContext 연결 된 속성 SslStream합니다.

인증에 실패하면 또는 를 AuthenticationExceptionInvalidCredentialException받게 됩니다. 이 경우 다른 자격 증명을 사용하여 인증을 다시 시도할 수 있습니다.

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw AuthenticateAsClient(NetworkCredential, ChannelBinding, String, ProtectionLevel, TokenImpersonationLevel)된 예외를 참조하세요.

추가 정보

적용 대상