다음을 통해 공유


PassportIdentity.GetIsAuthenticated 메서드

정의

사용자가 Passport 인증 기관에서 인증되었는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

오버로드

GetIsAuthenticated(Int32, Boolean, Boolean)

사용자가 Passport 인증을 담당하는 중앙 사이트에서 인증되었는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

GetIsAuthenticated(Int32, Int32, Int32)

사용자가 Passport 인증 기관에서 인증되었는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

설명

이 클래스는 않으며는 지원 되지 않습니다. Microsoft Passport Network가 Windows Live ID로 대체되었습니다.

GetIsAuthenticated(Int32, Boolean, Boolean)

사용자가 Passport 인증을 담당하는 중앙 사이트에서 인증되었는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

public:
 bool GetIsAuthenticated(int iTimeWindow, bool bForceLogin, bool bCheckSecure);
public bool GetIsAuthenticated (int iTimeWindow, bool bForceLogin, bool bCheckSecure);
member this.GetIsAuthenticated : int * bool * bool -> bool
Public Function GetIsAuthenticated (iTimeWindow As Integer, bForceLogin As Boolean, bCheckSecure As Boolean) As Boolean

매개 변수

iTimeWindow
Int32

회원이 마지막으로 호출 도메인에 로그온한 기간을 지정합니다. -1을 전달하여 Passport에서 기본값을 사용한다는 것을 나타냅니다.

bForceLogin
Boolean

iTimeWindow 매개 변수가 사용되는 방법을 결정합니다.

bCheckSecure
Boolean

암호화된 로그온 검사를 활성화합니다. SSL 로그온은 현재 버전의 로그인 서버에서 옵션으로 사용할 수 없으므로 전달된 값은 서버에서 무시됩니다.

반환

Boolean

사용자가 Passport 인증 기관에서 인증되면 true이고, 그렇지 않으면 false입니다.

설명

이 클래스는 않으며는 지원 되지 않습니다. Microsoft Passport Network가 Windows Live ID로 대체되었습니다.

적용 대상

GetIsAuthenticated(Int32, Int32, Int32)

사용자가 Passport 인증 기관에서 인증되었는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

public:
 bool GetIsAuthenticated(int iTimeWindow, int iForceLogin, int iCheckSecure);
public bool GetIsAuthenticated (int iTimeWindow, int iForceLogin, int iCheckSecure);
member this.GetIsAuthenticated : int * int * int -> bool
Public Function GetIsAuthenticated (iTimeWindow As Integer, iForceLogin As Integer, iCheckSecure As Integer) As Boolean

매개 변수

iTimeWindow
Int32

회원이 마지막으로 호출 도메인에 로그온한 기간을 지정합니다. -1은 Passport에서 기본값을 사용해야 한다는 것을 나타내고, 0은 false를 나타내며, 1은 true를 나타냅니다.

iForceLogin
Int32

iTimeWindow 매개 변수가 사용되는 방법을 결정합니다. -1은 Passport에서 기본값을 사용해야 한다는 것을 나타내고, 0은 false를 나타내며, 1은 true를 나타냅니다.

iCheckSecure
Int32

암호화된 로그온 검사를 활성화합니다. -1은 Passport에서 기본값을 사용해야 한다는 것을 나타내고, 0은 false를 나타내며, 1은 true를 나타냅니다.

Passport 버전 2.1 로그인 서버의 10 또는 100이라는 값은 Passport 관리자 IsAuthenticated 메서드에 대해 SecureLevel 10 또는 100을 지정하는 값입니다. 자세한 내용은 Passport 버전 2.1 SDK 설명서를 참조하세요.

SSL 로그온은 Passport 버전 1.4 로그인 서버에서 옵션으로 사용할 수 없습니다. iCheckSecure의 값은 서버에서 무시됩니다.

반환

Boolean

사용자가 Passport 인증을 담당하는 중앙 사이트에서 인증되면 true이고, 그렇지 않으면 false입니다.

예제

<!-- 
This example demonstrates implementing the soft sign-in authentication approach. 
In order for the example to work, the following requirements must be met. 
You can find details on these requirements in the Passport SDK documentation.

1. You must modify the Web.config file associated with this page so that 
authentication mode is set to "Passport".
2. You must have the Passport SDK installed.
3. You must have a Passport Site ID for the site where your page resides. 
If your Site ID is in the PREP environment, you will also need a PREP Passport.
4. You must have installed the encryption key you received after registering 
your site and receiving a site ID.
5. You must have the Passport Manager object settings correctly configured for 
your site.
-->

<!-- 
This example demonstrates implementing the soft sign-in authentication approach. 
In order for the example to work, the following requirements must be met. 
You can find details on these requirements in the Passport SDK documentation.

1. You must modify the Web.config file associated with this page so that 
authentication mode is set to "Passport".
2. You must have the Passport SDK installed.
3. You must have a Passport Site ID for the site where your page resides. 
If your Site ID is in the PREP environment, you will also need a PREP Passport.
4. You must have installed the encryption key you received after registering your 
site and receiving a site ID.
5. You must have the Passport Manager object settings correctly configured for your site.
-->

<!-- To view this code example in a fully-working sample, see the 
PassportIdentity Class topic. -->

<!-- To view this code example in a fully-working sample, see the 
PassportIdentity Class topic. -->

        PassportIdentity identity = (this.Context.User.Identity as PassportIdentity);    
        // Determine whether the user is already signed in with a valid
        // and current ticket. Passing -1 for the parameter values 
        // indicates the default values will be used.
        if (identity.GetIsAuthenticated(-1, -1, -1))
        {
            this.Response.Write("Welcome to the site.<br /><br />");
            // Print the Passport sign in button on the screen.
            this.Response.Write(identity.LogoTag2());
            // Make sure the user has core profile information before
            // trying to access it.
            if (identity.HasProfile("core"))
            {
                this.Response.Write("<b>You have been authenticated as " + 
                    "Passport identity:" + identity.Name + "</b></p>");
            }
        }

        // Determine whether the user has a ticket.
        else if (identity.HasTicket)
        {
            // If the user has a ticket but wasn't authenticated, that 
            // means the ticket is stale, so the login needs to be refreshed.
            // Passing true as the fForceLogin parameter value indicates that 
            // silent refresh will be accepted.
            identity.LoginUser(null, -1, true, null, -1, null, -1, true, null);
        }
        Dim identity As PassportIdentity = Me.Context.User.Identity
        ' Determine whether the user is already signed in with a valid
        ' and current ticket. Passing -1 for the parameter values 
        ' indicates the default values will be used.
        If (identity.GetIsAuthenticated(-1, -1, -1)) Then
            Me.Response.Write("Welcome to the site.<br /><br />")
            ' Print the Passport sign in button on the screen.
            Me.Response.Write(identity.LogoTag2())
            ' Make sure the user has core profile information before
            ' trying to access it.
            If (identity.HasProfile("core")) Then
                Me.Response.Write("<b>You have been authenticated as " & _ 
                "Passport identity:" & identity.Name & "</b></p>")
            End If

        ' Determine whether the user has a ticket.
        ElseIf identity.HasTicket Then
            ' If the user has a ticket but wasn't authenticated, that 
            ' means the ticket is stale, so the login needs to be refreshed.
            ' Passing true as the fForceLogin parameter value indicates that 
            ' silent refresh will be accepted.
            identity.LoginUser(Nothing, -1, True, Nothing, -1, Nothing, _
                -1, True, Nothing)

설명

이 클래스는 않으며는 지원 되지 않습니다. Microsoft Passport Network가 Windows Live ID로 대체되었습니다.

적용 대상