다음을 통해 공유


AuthenticationService.Login(String, String, String, Boolean) 메서드

정의

사용자 자격 증명을 검사하고 자격 증명이 유효한 경우 인증 티켓(쿠키)을 만듭니다.

public:
 bool Login(System::String ^ username, System::String ^ password, System::String ^ customCredential, bool isPersistent);
[System.ServiceModel.OperationContract]
public bool Login (string username, string password, string customCredential, bool isPersistent);
[<System.ServiceModel.OperationContract>]
member this.Login : string * string * string * bool -> bool
Public Function Login (username As String, password As String, customCredential As String, isPersistent As Boolean) As Boolean

매개 변수

username
String

유효성을 검사할 사용자 이름입니다.

password
String

지정된 사용자의 암호입니다.

customCredential
String

usernamepassword 외에 유효성을 검사할 값입니다(있을 경우).

isPersistent
Boolean

세션 간에 인증 티켓이 유효하게 남아 있는지 여부를 나타내는 값입니다.

반환

사용자 자격 증명이 유효하면 true이고, 그렇지 않으면 false입니다.

특성

예외

userName 또는 passwordnull인 경우

설명

Login 메서드 멤버 자격 공급자를 통해 사용자 자격 증명의 유효성을 검사 합니다. 기본 멤버 자격 공급자를 사용 하거나 런타임에 사용자 지정 멤버 자격 공급자를 지정할 수 있습니다. 합니다 AuthenticationService 전달 클래스 userNamepassword 멤버 자격 공급자로 ValidateUser 메서드를 전달 하지 않습니다 customCredential합니다. 하는 경우 ValidateUser 반환 true, AuthenticationService 쿠키로 인증 티켓을 만듭니다. 설정 합니다 isPersistent 매개 변수를 true 현재 세션이 지속 되는 인증 티켓을 만들려고 합니다.

참고

항상 secure sockets layer (SSL HTTPS를 사용 하 여)와 함께 인증 서비스를 사용 하 여 중요 한 데이터를 보호 합니다.

합니다 Login 메서드를 발생 시킵니다 합니다 Authenticating 이벤트 및 CreatingCookie 이벤트입니다. 이벤트 처리기를 만듭니다 Authenticating 의 값을 검사 하는 등의 인증에 맞게 customCredential 또는 기본이 아닌 멤버 자격 공급자를 통해 자격 증명 유효성 검사 합니다. 값 customCredential 기본 멤버 자격 공급자에 의해 유효성이 검사 되지 않습니다. 인증 쿠키를 사용자 지정 하려면 이벤트 처리기를 만들 CreatingCookie합니다.

참고

호출 하지 마십시오는 Login 메서드에서 웹 서버에서 실행 되는 코드입니다. 호출 된 Login WCF 서비스의 일부로 합니다. 자세한 내용은 ASP.NET 인증합니다.

적용 대상

추가 정보