ClientFormsAuthenticationCredentials 클래스

정의

클라이언트 애플리케이션 서비스를 사용하여 양식 인증에 대한 사용자 로그인 정보를 나타냅니다.

public ref class ClientFormsAuthenticationCredentials
public class ClientFormsAuthenticationCredentials
type ClientFormsAuthenticationCredentials = class
Public Class ClientFormsAuthenticationCredentials
상속
ClientFormsAuthenticationCredentials

예제

다음 예제 코드는 이 클래스의 인스턴스를 IClientFormsAuthenticationCredentialsProvider.GetCredentials 반환하는 메서드를 구현하는 방법을 보여 줍니다. 이 예제에서 GetCredentials 메서드는 로그인 대화 상자 클래스의 일부입니다. 이 메서드는 대화 상자를 표시한 다음 사용자가 지정한 ClientFormsAuthenticationCredentials 값으로 초기화된 인스턴스를 반환합니다.

public ClientFormsAuthenticationCredentials GetCredentials()
{
    if (this.ShowDialog() == DialogResult.OK)
    {
        return new ClientFormsAuthenticationCredentials(
            usernameTextBox.Text, passwordTextBox.Text,
            rememberMeCheckBox.Checked);
    }
    else
    {
        return null;
    }
}
Public Function GetCredentials() As  _
    ClientFormsAuthenticationCredentials Implements _
    IClientFormsAuthenticationCredentialsProvider.GetCredentials

    If Me.ShowDialog() = DialogResult.OK Then
        Return New ClientFormsAuthenticationCredentials( _
            UsernameTextBox.Text, PasswordTextBox.Text, _
            rememberMeCheckBox.Checked)
    Else
        Return Nothing
    End If

End Function

설명

클래스는 ClientFormsAuthenticationCredentials 인터페이스에서 IClientFormsAuthenticationCredentialsProvider 사용됩니다. 이 인터페이스를 구현할 때 구현에서 이 클래스 GetCredentials 의 채워진 인스턴스를 반환해야 합니다.

생성자

Name Description
ClientFormsAuthenticationCredentials(String, String, Boolean)

ClientFormsAuthenticationCredentials 클래스의 새 인스턴스를 초기화합니다.

속성

Name Description
Password

사용자 암호를 가져오거나 설정합니다.

RememberMe

사용자 자격 증명을 저장하고 후속 로그인 시도에 다시 사용할지 여부를 나타내는 값을 가져오거나 설정합니다.

UserName

사용자 이름을 가져오거나 설정합니다.

메서드

Name Description
Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보