ClaimsPrincipal.Identity 속성

정의

이 클레임 보안 주체와 연결된 기본 클레임 ID를 가져옵니다.

public:
 virtual property System::Security::Principal::IIdentity ^ Identity { System::Security::Principal::IIdentity ^ get(); };
public virtual System.Security.Principal.IIdentity Identity { get; }
public virtual System.Security.Principal.IIdentity? Identity { get; }
member this.Identity : System.Security.Principal.IIdentity
Public Overridable ReadOnly Property Identity As IIdentity

속성 값

이 클레임 주체와 연결된 주 클레임 ID입니다.

구현

설명

기본적으로 프레임워크는 ID를 반환할 때 형식 WindowsIdentity 의 ID 우선 순위를 지정합니다. 컬렉션에 있는 첫 번째 WindowsIdentityIdentities 반환됩니다. 컬렉션에 가 없 WindowsIdentity 으면 에서 ClaimsIdentity 할당할 수 있는 첫 번째 ID가 반환됩니다. 가 없 ClaimsIdentitynull 으면 가 반환됩니다. 컬렉션이 Identities 비어 있으면 이 ArgumentNullException throw됩니다.

ID를 결정하기 위해 호출할 대리자를 지정하도록 속성을 설정 PrimaryIdentitySelector 하여 기본 동작을 변경할 수 있습니다.

적용 대상

추가 정보