PassportIdentity 클래스

정의

주의

This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.

PassportAuthenticationModule에서 사용하는 클래스를 제공합니다. 또한 애플리케이션이 Ticket(String) 메서드에 액세스할 수 있는 방법을 제공합니다. 이 클래스는 상속될 수 없습니다. 이 클래스는 사용되지 않습니다.

public ref class PassportIdentity sealed : System::Security::Principal::IIdentity
public ref class PassportIdentity sealed : IDisposable, System::Security::Principal::IIdentity
public sealed class PassportIdentity : System.Security.Principal.IIdentity
public sealed class PassportIdentity : IDisposable, System.Security.Principal.IIdentity
[System.Obsolete("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
public sealed class PassportIdentity : IDisposable, System.Security.Principal.IIdentity
type PassportIdentity = class
    interface IIdentity
type PassportIdentity = class
    interface IIdentity
    interface IDisposable
[<System.Obsolete("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")>]
type PassportIdentity = class
    interface IIdentity
    interface IDisposable
Public NotInheritable Class PassportIdentity
Implements IIdentity
Public NotInheritable Class PassportIdentity
Implements IDisposable, IIdentity
상속
PassportIdentity
특성
구현

예제

<!-- 
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.
-->

<%@ Page language="c#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.Runtime.InteropServices" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    {
        try 
        {
            // Determine whether Passport is the type of authentication
            // this page is set to use. (Authentication information
            // is set in the Web.config file.)
            if (!(this.Context.User.Identity is PassportIdentity))
            {
                // If this page isn't set to use Passport authentication,
                // quit now.
                this.Response.Write("Error: Passport authentication failed. " + 
                    "Make sure that the Passport SDK is installed " +
                    "and your Web.config file is configured correctly.");
                return;
            }

            // Expire the page to avoid the browser's cache.
           Response.Cache.SetNoStore(); 


            // Get a version of the Identity value that is cast as type
            // PassportIdentity. 
//<Snippet4>
//<Snippet5>
//<Snippet6>
            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());
//</Snippet6>
                // 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>");
                }
            }
//</Snippet5>            
    
            // 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);
            }
//</Snippet4>

            // If the user does not already have a ticket, ask the user
            // to sign in.
            else
            {
                this.Response.Write("Please sign in using the link below.<br /><br />");
                // Print the Passport sign in button on the screen.
                this.Response.Write(identity.LogoTag2());
            }
        }
        catch (System.Runtime.InteropServices.COMException comError)
        {
            this.Response.Write("An error occurred while working with the " +
                "Passport SDK.");
        }
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>ASP.NET Example</title>
</head>
    <body>
        <form id="form1" runat="server">
        </form>
    </body>
</html>
<%@ Page language="VB" AutoEventWireup="true" %>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.Runtime.InteropServices" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    Private Sub Page_Load(sender As Object, e As System.EventArgs)
        Try 
            ' Determine whether Passport is the type of authentication
            ' this page is set to use. (Authentication information
            ' is set in the Web.config file.)
            If Not TypeOf(Me.Context.User.Identity) Is PassportIdentity Then
                ' If this page isn't set to use Passport authentication,
                ' quit now.
                 Me.Response.Write("Error: Passport authentication failed. " & _
                     "Make sure that the Passport SDK is installed and your " & _
                     "Web.config file is configured correctly.")
                Return
            End If

            ' Expire the page to avoid the browser's cache.
            Response.Cache.SetNoStore()
            
            ' Get a version of the Identity value that is cast as type
            ' PassportIdentity. 
'<Snippet4>
'<Snippet5>
'<Snippet6>
            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())
'</Snippet6>
                ' 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
'</Snippet5>            
    
            ' 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)
'</Snippet4>

            ' If the user does not already have a ticket, ask the user
            ' to sign in.
            Else
                Me.Response.Write("Please sign in using the link below.<br /><br />")
                ' Print the Passport sign in button on the screen.
                Me.Response.Write(identity.LogoTag2())
            End If

        Catch comError As System.Runtime.InteropServices.COMException
            Me.Response.Write("An error occurred while working with the " & _
                "Passport SDK. The following result was returned: " & _
                comError.ErrorCode)
        End Try
    End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>ASP.NET Example</title>
</head>

    <body>
        <form id="form1" runat="server">
        </form>
    </body>
</html>

설명

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

생성자

PassportIdentity()

PassportIdentity 클래스의 새 인스턴스를 초기화합니다. 이 클래스는 사용되지 않습니다.

속성

AuthenticationType

사용자를 식별하는 데 사용되는 인증 형식을 가져옵니다. 이 클래스는 사용되지 않습니다.

Error

현재 Passport 티켓과 관련된 오류 상태를 나타내는 값을 가져옵니다. 이 클래스는 사용되지 않습니다.

GetFromNetworkServer

Passport 서버 연결 및 쿼리 문자열에 대한 정보를 가져옵니다. 이 클래스는 사용되지 않습니다.

HasSavedPassword

Passport 회원의 암호가 저장되었는지 여부를 나타내는 정보를 가져옵니다. 이 클래스는 사용되지 않습니다.

HasTicket

쿼리 문자열에 쿠키로 Passport 티켓이 포함되는지 여부를 나타내는 값을 가져옵니다. 이 클래스는 사용되지 않습니다.

HexPUID

현재 인증된 사용자의 16진수 PUID(Passport Unique Identifier)를 가져옵니다. 이 클래스는 사용되지 않습니다.

IsAuthenticated

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

Item[String]

Passport 프로필 특성을 가져옵니다. 이 클래스는 사용되지 않습니다.

Name

현재 사용자의 이름을 가져옵니다. 이 클래스는 사용되지 않습니다.

TicketAge

마지막으로 티켓을 발행하거나 새로 고친 이후의 시간(초)을 가져옵니다. 이 클래스는 사용되지 않습니다.

TimeSinceSignIn

멤버가 Passport 로그온 서버에 로그온한 후 경과된 시간(초)을 가져옵니다. 이 클래스는 사용되지 않습니다.

메서드

AuthUrl()

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL이 포함된 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl(String)

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL이 포함된 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl(String, Int32, Boolean, String, Int32, String, Int32, Boolean)

회원의 인증 서버 URL을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl(String, Int32, Int32, String, Int32, String, Int32, Int32)

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL이 포함된 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl2()

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL이 포함된 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl2(String)

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL이 포함된 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl2(String, Int32, Boolean, String, Int32, String, Int32, Boolean)

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL이 포함된 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

AuthUrl2(String, Int32, Int32, String, Int32, String, Int32, Int32)

쿼리 문자열의 로그인 서버로 전달된 선택적 정보와 함께 회원의 로그인 서버 URL을 포함하는 문자열을 검색합니다. 이 클래스는 사용되지 않습니다.

Compress(String)

데이터를 압축합니다. 이 클래스는 사용되지 않습니다.

CryptIsValid()

Passport 관리자가 유효한 암호화 상태에 있는지를 나타내는 플래그 상태를 가져옵니다. 이 클래스는 사용되지 않습니다.

CryptPutHost(String)

Passport 암호화 및 해독에 사용할 키를 설정합니다. 이 클래스는 사용되지 않습니다.

CryptPutSite(String)

키가 처음으로 설치될 때 해당 키에 할당된 사이트 이름 레이블을 참조하여 Passport 암호화 및 해독에 사용할 키를 설정합니다. 이 클래스는 사용되지 않습니다.

Decompress(String)

Compress(String) 메서드로 압축된 데이터의 압축을 풉니다. 이 클래스는 사용되지 않습니다.

Decrypt(String)

현재 사이트의 Passport 참가 요소 키를 사용하여 데이터를 해독합니다. 이 클래스는 사용되지 않습니다.

Encrypt(String)

현재 사이트의 Passport 참가 요소 키를 사용하여 데이터를 암호화합니다. 이 클래스는 사용되지 않습니다.

Equals(Object)

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

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

가비지 컬렉션에서 회수하기 전에 Passport ID에서 리소스를 해제하고 다른 정리 작업을 수행할 수 있게 합니다.

GetCurrentConfig(String)

HKLM\SW\Microsoft\Passport 하이브에 있는 레지스트리 키의 내용을 가져옵니다. 이 클래스는 사용되지 않습니다.

GetDomainAttribute(String, Int32, String)

Passport 관리자에게 요청된 도메인 특성을 쿼리하여 Passport 도메인에 정보를 제공합니다. 이 클래스는 사용되지 않습니다.

GetDomainFromMemberName(String)

회원 이름 문자열에서 Passport 도메인을 반환합니다. 이 클래스는 사용되지 않습니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetIsAuthenticated(Int32, Boolean, Boolean)

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

GetIsAuthenticated(Int32, Int32, Int32)

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

GetLoginChallenge()

302 리디렉션 URL을 생성하거나 Passport 인식 클라이언트 인증 교환을 초기화하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

GetLoginChallenge(String)

302 리디렉션 URL이나 Passport 인식 클라이언트 인증 교환의 초기화로 적절한 헤더를 출력하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

GetLoginChallenge(String, Int32, Int32, String, Int32, String, Int32, Int32, Object)

302 리디렉션 URL을 생성하거나 Passport 인식 클라이언트 인증 교환을 초기화하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

GetOption(String)

특정 Passport 로그온 옵션을 가져옵니다. 이 클래스는 사용되지 않습니다.

GetProfileObject(String)

지정된 프로필 특성에 대한 Passport 프로필 정보를 반환합니다. 이 클래스는 사용되지 않습니다.

GetType()

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

(다음에서 상속됨 Object)
HasFlag(Int32)

주어진 플래그가 이 사용자의 프로필에 설정되어 있는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

HasProfile(String)

주어진 프로필 특성이 이 사용자의 프로필에 있는지 여부를 나타냅니다. 이 클래스는 사용되지 않습니다.

HaveConsent(Boolean, Boolean)

이 사용자의 프로필에 전체 동의가 부여되었는지 여부를 나타납니다. 이 클래스는 사용되지 않습니다.

LoginUser()

302 리디렉션 URL을 생성하거나 Passport 인식 클라이언트 인증 교환을 초기화하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

LoginUser(String)

302 리디렉션 URL을 생성하거나 Passport 인식 클라이언트 인증 교환을 초기화하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

LoginUser(String, Int32, Boolean, String, Int32, String, Int32, Boolean, Object)

302 리디렉션 URL을 생성하거나 Passport 인식 클라이언트 인증 교환을 초기화하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

LoginUser(String, Int32, Int32, String, Int32, String, Int32, Int32, Object)

302 리디렉션 URL을 생성하거나 Passport 인식 클라이언트 인증 교환을 초기화하여 사용자가 로그온합니다. 이 클래스는 사용되지 않습니다.

LogoTag()

Passport 링크의 이미지 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag(String)

Passport 링크의 HTML <img> 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag(String, Int32, Boolean, String, Int32, Boolean, String, Int32, Boolean)

Passport 링크의 HTML <img> 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag(String, Int32, Int32, String, Int32, Int32, String, Int32, Int32)

Passport 링크의 HTML <img> 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag2()

Passport 링크의 이미지 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag2(String)

Passport 링크의 HTML <img> 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag2(String, Int32, Boolean, String, Int32, Boolean, String, Int32, Boolean)

Passport 링크의 HTML <img> 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoTag2(String, Int32, Int32, String, Int32, Int32, String, Int32, Int32)

Passport 링크의 HTML <img> 태그를 포함하는 HTML 부분을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoutURL()

Passport 로그아웃 URL 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

LogoutURL(String, String, Int32, String, Int32)

지정된 매개 변수를 사용하여 Passport 로그아웃 URL 문자열을 반환합니다. 이 클래스는 사용되지 않습니다.

MemberwiseClone()

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

(다음에서 상속됨 Object)
SetOption(String, Object)

특정 Passport 로그온 옵션을 설정합니다. 이 클래스는 사용되지 않습니다.

SignOut(String)

현재 세션에서 주어진 Passport 회원을 로그오프합니다. 이 클래스는 사용되지 않습니다.

Ticket(String)

Passport 인증 티켓의 특정 특성에 대한 정보를 가져옵니다. 이 클래스는 사용되지 않습니다.

ToString()

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

(다음에서 상속됨 Object)

명시적 인터페이스 구현

IDisposable.Dispose()

PassportIdentity 클래스에서 사용하는 모든 리소스를 해제합니다. 이 클래스는 사용되지 않습니다.

적용 대상