NegotiateStream.AuthenticateAsServerAsync 메서드

정의

클라이언트-서버 연결의 서버 측 인증을 비동기 작업으로 처리합니다.

오버로드

AuthenticateAsServerAsync()

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

AuthenticateAsServerAsync(ExtendedProtectionPolicy)

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

AuthenticateAsServerAsync(NetworkCredential, ProtectionLevel, TokenImpersonationLevel)

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

AuthenticateAsServerAsync(NetworkCredential, ExtendedProtectionPolicy, ProtectionLevel, TokenImpersonationLevel)

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

AuthenticateAsServerAsync()

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

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

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

반환

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

예외

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

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

이 개체가 닫힌 경우.

Windows 95 및 Windows 98은 지원되지 않습니다.

설명

인증은 서버의 DefaultCredentials를 사용합니다. 서버에 대해 SPN(서비스 사용자 이름)이 지정되지 않았습니다. 가장 수준은 이 Identification고 보안 수준은 입니다 EncryptAndSign.

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

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

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

적용 대상

AuthenticateAsServerAsync(ExtendedProtectionPolicy)

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

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

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsServerAsync(System::Security::Authentication::ExtendedProtection::ExtendedProtectionPolicy ^ policy);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy? policy);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy);
abstract member AuthenticateAsServerAsync : System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy -> System.Threading.Tasks.Task
override this.AuthenticateAsServerAsync : System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsServerAsync (policy As ExtendedProtectionPolicy) As Task

매개 변수

policy
ExtendedProtectionPolicy

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

반환

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

예외

CustomChannelBindingpolicy 매개 변수에서 전달되어 확장된 보호 정책 상의 CustomServiceNames 모두 null입니다.

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

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

이 개체가 닫힌 경우.

policy 매개 변수는 확장된 보호를 지원하지 않는 플랫폼에서 Always로 설정되었습니다.

Windows 95 및 Windows 98은 지원되지 않습니다.

설명

인증은 서버의 DefaultCredentials를 사용합니다. 서버에 대해 SPN(서비스 사용자 이름)이 지정되지 않았습니다. 가장 수준은 이 Identification고 보안 수준은 입니다 EncryptAndSign.

매개 변수가 이 policy 면 로 설정된 Never확장된 보호 정책이 사용됩니다PolicyEnforcement.null

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

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

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

추가 정보

적용 대상

AuthenticateAsServerAsync(NetworkCredential, ProtectionLevel, TokenImpersonationLevel)

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

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

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

매개 변수

credential
NetworkCredential

서버의 ID를 설정하는 데 사용되는 NetworkCredential입니다.

requiredProtectionLevel
ProtectionLevel

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

requiredImpersonationLevel
TokenImpersonationLevel

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

반환

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

예외

credential이(가) null인 경우

requiredImpersonationLevelIdentification, Impersonation 또는 Delegation이어야 하는 경우.

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

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

이 개체가 닫힌 경우.

인증이 이미 발생한 경우.

또는

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

Windows 95 및 Windows 98은 지원되지 않습니다.

설명

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

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

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

적용 대상

AuthenticateAsServerAsync(NetworkCredential, ExtendedProtectionPolicy, ProtectionLevel, TokenImpersonationLevel)

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

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

public:
 virtual System::Threading::Tasks::Task ^ AuthenticateAsServerAsync(System::Net::NetworkCredential ^ credential, System::Security::Authentication::ExtendedProtection::ExtendedProtectionPolicy ^ policy, System::Net::Security::ProtectionLevel requiredProtectionLevel, System::Security::Principal::TokenImpersonationLevel requiredImpersonationLevel);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy? policy, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel);
public virtual System.Threading.Tasks.Task AuthenticateAsServerAsync (System.Net.NetworkCredential credential, System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy policy, System.Net.Security.ProtectionLevel requiredProtectionLevel, System.Security.Principal.TokenImpersonationLevel requiredImpersonationLevel);
abstract member AuthenticateAsServerAsync : System.Net.NetworkCredential * System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy * System.Net.Security.ProtectionLevel * System.Security.Principal.TokenImpersonationLevel -> System.Threading.Tasks.Task
override this.AuthenticateAsServerAsync : System.Net.NetworkCredential * System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicy * System.Net.Security.ProtectionLevel * System.Security.Principal.TokenImpersonationLevel -> System.Threading.Tasks.Task
Public Overridable Function AuthenticateAsServerAsync (credential As NetworkCredential, policy As ExtendedProtectionPolicy, requiredProtectionLevel As ProtectionLevel, requiredImpersonationLevel As TokenImpersonationLevel) As Task

매개 변수

credential
NetworkCredential

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

policy
ExtendedProtectionPolicy

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

requiredProtectionLevel
ProtectionLevel

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

requiredImpersonationLevel
TokenImpersonationLevel

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

반환

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

예외

CustomChannelBindingpolicy 매개 변수에서 전달되어 확장된 보호 정책 상의 CustomServiceNames 모두 null입니다.

credential이(가) null인 경우

requiredImpersonationLevelIdentification, Impersonation 또는 Delegation이어야 하는 경우.

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

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

인증이 이미 발생한 경우.

또는

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

이 개체가 닫힌 경우.

policy 매개 변수는 확장된 보호를 지원하지 않는 플랫폼에서 Always로 설정되었습니다.

Windows 95 및 Windows 98은 지원되지 않습니다.

설명

매개 변수가 이 policy 면 로 설정된 Never확장된 보호 정책이 사용됩니다PolicyEnforcement.null

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

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

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

추가 정보

적용 대상