C# 클래스 System.Security.Claims.ClaimsPrincipal

상속: System.Security.Principal.IPrincipal
파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

공개 메소드들

메소드 설명
AddIdentities ( IEnumerable identities ) : void

Adds a IEnumerable{ClaimsIdentity} to the internal list.

AddIdentity ( ClaimsIdentity identity ) : void

Adds a single ClaimsIdentity to an internal list.

ClaimsPrincipal ( )
ClaimsPrincipal ( System reader )
ClaimsPrincipal ( System identities )
ClaimsPrincipal ( ) : System.Collections.Generic

Initializes an instance of ClaimsPrincipal.

ClaimsPrincipal ( BinaryReader reader ) : System.Collections.Generic

Initializes an instance of ClaimsPrincipal using a BinaryReader. Normally the BinaryReader is constructed using the bytes from WriteTo(BinaryWriter) and initialized in the same way as the BinaryWriter.

ClaimsPrincipal ( IEnumerable identities ) : System.Collections.Generic

Initializes an instance of ClaimsPrincipal.

ClaimsPrincipal ( IIdentity identity ) : System.Collections.Generic

Initializes an instance of ClaimsPrincipal

ClaimsPrincipal ( IPrincipal principal ) : System.Collections.Generic

Initializes an instance of ClaimsPrincipal

Clone ( ) : ClaimsPrincipal

Creates a new instance of ClaimsPrincipal with values copied from this object.

Clone ( ) : System.Security.Claims.ClaimsPrincipal
FindAll ( Predicate match ) : IEnumerable

Retrieves a IEnumerable{Claim} where each claim is matched by .

Each ClaimsIdentity is called. ClaimsIdentity.FindAll.

FindAll ( string type ) : IEnumerable

Retrieves a IEnumerable{Claim} where each Claim.Type equals type.

Each ClaimsIdentity is called. ClaimsIdentity.FindAll.

FindAll ( System match ) : System.Collections.Generic.IEnumerable
FindAll ( string type ) : System.Collections.Generic.IEnumerable
FindFirst ( Predicate match ) : Claim

Retrieves the first Claim that is matched by .

Each ClaimsIdentity is called. ClaimsIdentity.FindFirst.

FindFirst ( string type ) : Claim

Retrieves the first Claim where the Claim.Type equals type.

Each ClaimsIdentity is called. ClaimsIdentity.FindFirst.

FindFirst ( System match ) : System.Security.Claims.Claim
FindFirst ( string type ) : System.Security.Claims.Claim
HasClaim ( Predicate match ) : bool

Determines if a claim is contained within all the ClaimsIdentities in this ClaimPrincipal.

Each ClaimsIdentity is called. ClaimsIdentity.HasClaim.

HasClaim ( System match ) : bool
HasClaim ( string type, string value ) : bool

Determines if a claim of claimType AND claimValue exists in any of the identities.

Each ClaimsIdentity is called. ClaimsIdentity.HasClaim.

IsInRole ( string role ) : bool

IsInRole answers the question: does an identity this principal possesses contain a claim of type RoleClaimType where the value is '==' to the role.

Each Identity has its own definition of the ClaimType that represents a role.

WriteTo ( BinaryWriter writer ) : void

Serializes using a BinaryWriter

WriteTo ( System writer ) : void

보호된 메소드들

메소드 설명
ClaimsPrincipal ( System info, System context )
ClaimsPrincipal ( SerializationInfo info, StreamingContext context ) : System.Collections.Generic
CreateClaimsIdentity ( BinaryReader reader ) : ClaimsIdentity

Provides and extensibility point for derived types to create a custom ClaimsIdentity.

CreateClaimsIdentity ( System reader ) : System.Security.Claims.ClaimsIdentity
GetObjectData ( SerializationInfo info, StreamingContext context ) : void
GetObjectData ( System info, System context ) : void
WriteTo ( BinaryWriter writer, byte userData ) : void

Serializes using a BinaryWriter

WriteTo ( System writer, byte userData ) : void

비공개 메소드들

메소드 설명
AddIdentities ( System identities ) : void
AddIdentity ( System identity ) : void
Initialize ( BinaryReader reader ) : void

Initializes from a BinaryReader. Normally the reader is initialized with the results from WriteTo(BinaryWriter) Normally the BinaryReader is initialized in the same way as the BinaryWriter passed to WriteTo(BinaryWriter).

OnSerializingMethod ( StreamingContext context ) : void
SelectPrimaryIdentity ( IEnumerable identities ) : ClaimsIdentity

This method iterates through the collection of ClaimsIdentities and chooses an identity as the primary.

메소드 상세

AddIdentities() 공개 메소드

Adds a IEnumerable{ClaimsIdentity} to the internal list.
if 'identities' is null.
public AddIdentities ( IEnumerable identities ) : void
identities IEnumerable Enumeration of ClaimsIdentities to add.
리턴 void

AddIdentity() 공개 메소드

Adds a single ClaimsIdentity to an internal list.
if 'identity' is null.
public AddIdentity ( ClaimsIdentity identity ) : void
identity ClaimsIdentity the add.
리턴 void

ClaimsPrincipal() 공개 메소드

public ClaimsPrincipal ( )

ClaimsPrincipal() 공개 메소드

public ClaimsPrincipal ( System reader )
reader System

ClaimsPrincipal() 보호된 메소드

protected ClaimsPrincipal ( System info, System context )
info System
context System

ClaimsPrincipal() 공개 메소드

public ClaimsPrincipal ( System identities )
identities System

ClaimsPrincipal() 공개 메소드

Initializes an instance of ClaimsPrincipal.
public ClaimsPrincipal ( ) : System.Collections.Generic
리턴 System.Collections.Generic

ClaimsPrincipal() 공개 메소드

Initializes an instance of ClaimsPrincipal using a BinaryReader. Normally the BinaryReader is constructed using the bytes from WriteTo(BinaryWriter) and initialized in the same way as the BinaryWriter.
if 'reader' is null.
public ClaimsPrincipal ( BinaryReader reader ) : System.Collections.Generic
reader BinaryReader a pointing to a .
리턴 System.Collections.Generic

ClaimsPrincipal() 공개 메소드

Initializes an instance of ClaimsPrincipal.
if 'identities' is null.
public ClaimsPrincipal ( IEnumerable identities ) : System.Collections.Generic
identities IEnumerable the subjects in the principal.
리턴 System.Collections.Generic

ClaimsPrincipal() 공개 메소드

Initializes an instance of ClaimsPrincipal
if 'identity' is null.
public ClaimsPrincipal ( IIdentity identity ) : System.Collections.Generic
identity IIdentity representing the subject in the principal.
리턴 System.Collections.Generic

ClaimsPrincipal() 공개 메소드

Initializes an instance of ClaimsPrincipal
if 'principal' is null.
public ClaimsPrincipal ( IPrincipal principal ) : System.Collections.Generic
principal IPrincipal used to form this instance.
리턴 System.Collections.Generic

ClaimsPrincipal() 보호된 메소드

protected ClaimsPrincipal ( SerializationInfo info, StreamingContext context ) : System.Collections.Generic
info SerializationInfo
context StreamingContext
리턴 System.Collections.Generic

Clone() 공개 메소드

Creates a new instance of ClaimsPrincipal with values copied from this object.
public Clone ( ) : ClaimsPrincipal
리턴 ClaimsPrincipal

Clone() 공개 메소드

public Clone ( ) : System.Security.Claims.ClaimsPrincipal
리턴 System.Security.Claims.ClaimsPrincipal

CreateClaimsIdentity() 보호된 메소드

Provides and extensibility point for derived types to create a custom ClaimsIdentity.
if 'reader' is null.
protected CreateClaimsIdentity ( BinaryReader reader ) : ClaimsIdentity
reader BinaryReader the that points at the claim.
리턴 ClaimsIdentity

CreateClaimsIdentity() 보호된 메소드

protected CreateClaimsIdentity ( System reader ) : System.Security.Claims.ClaimsIdentity
reader System
리턴 System.Security.Claims.ClaimsIdentity

FindAll() 공개 메소드

Retrieves a IEnumerable{Claim} where each claim is matched by .
Each ClaimsIdentity is called. ClaimsIdentity.FindAll.
if 'match' is null.
public FindAll ( Predicate match ) : IEnumerable
match Predicate The predicate that performs the matching logic.
리턴 IEnumerable

FindAll() 공개 메소드

Retrieves a IEnumerable{Claim} where each Claim.Type equals type.
Each ClaimsIdentity is called. ClaimsIdentity.FindAll.
if 'type' is null.
public FindAll ( string type ) : IEnumerable
type string The type of the claim to match.
리턴 IEnumerable

FindAll() 공개 메소드

public FindAll ( System match ) : System.Collections.Generic.IEnumerable
match System
리턴 System.Collections.Generic.IEnumerable

FindAll() 공개 메소드

public FindAll ( string type ) : System.Collections.Generic.IEnumerable
type string
리턴 System.Collections.Generic.IEnumerable

FindFirst() 공개 메소드

Retrieves the first Claim that is matched by .
Each ClaimsIdentity is called. ClaimsIdentity.FindFirst.
if 'match' is null.
public FindFirst ( Predicate match ) : Claim
match Predicate The predicate that performs the matching logic.
리턴 Claim

FindFirst() 공개 메소드

Retrieves the first Claim where the Claim.Type equals type.
Each ClaimsIdentity is called. ClaimsIdentity.FindFirst.
if 'type' is null.
public FindFirst ( string type ) : Claim
type string The type of the claim to match.
리턴 Claim

FindFirst() 공개 메소드

public FindFirst ( System match ) : System.Security.Claims.Claim
match System
리턴 System.Security.Claims.Claim

FindFirst() 공개 메소드

public FindFirst ( string type ) : System.Security.Claims.Claim
type string
리턴 System.Security.Claims.Claim

GetObjectData() 보호된 메소드

protected GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info SerializationInfo
context StreamingContext
리턴 void

GetObjectData() 보호된 메소드

protected GetObjectData ( System info, System context ) : void
info System
context System
리턴 void

HasClaim() 공개 메소드

Determines if a claim is contained within all the ClaimsIdentities in this ClaimPrincipal.
Each ClaimsIdentity is called. ClaimsIdentity.HasClaim.
if 'match' is null.
public HasClaim ( Predicate match ) : bool
match Predicate The predicate that performs the matching logic.
리턴 bool

HasClaim() 공개 메소드

public HasClaim ( System match ) : bool
match System
리턴 bool

HasClaim() 공개 메소드

Determines if a claim of claimType AND claimValue exists in any of the identities.
Each ClaimsIdentity is called. ClaimsIdentity.HasClaim.
if 'type' is null. if 'value' is null.
public HasClaim ( string type, string value ) : bool
type string the type of the claim to match.
value string the value of the claim to match.
리턴 bool

IsInRole() 공개 메소드

IsInRole answers the question: does an identity this principal possesses contain a claim of type RoleClaimType where the value is '==' to the role.
Each Identity has its own definition of the ClaimType that represents a role.
public IsInRole ( string role ) : bool
role string The role to check for.
리턴 bool

WriteTo() 공개 메소드

Serializes using a BinaryWriter
if 'writer' is null.
public WriteTo ( BinaryWriter writer ) : void
writer BinaryWriter
리턴 void

WriteTo() 보호된 메소드

Serializes using a BinaryWriter
if 'writer' is null.
protected WriteTo ( BinaryWriter writer, byte userData ) : void
writer BinaryWriter the to use for data storage.
userData byte additional data provided by derived type.
리턴 void

WriteTo() 공개 메소드

public WriteTo ( System writer ) : void
writer System
리턴 void

WriteTo() 보호된 메소드

protected WriteTo ( System writer, byte userData ) : void
writer System
userData byte
리턴 void