C# Class Thinktecture.IdentityModel.Extensions.IClaimsPrincipalExtensions

Datei anzeigen Open project: IdentityModel/Thinktecture.IdentityModel.v1

Public Methods

Method Description
ClaimExists ( this principal, Predicate predicate ) : bool

Checks whether a given claim exists

ClaimExists ( this principal, string claimType ) : bool

Checks whether a given claim exists

ClaimExists ( this principal, string claimType, string value ) : bool

Checks whether a given claim exists.

ClaimExists ( this principal, string claimType, string value, string issuer ) : bool

Checks whether a given claim exists.

First ( this principal ) : IClaimsIdentity

Retrieves the first identity of an IClaimsPrincipal.

GetClaimValue ( this principal, string claimType ) : string

Retrieves the value of a claim.

GetClaimValue ( this principal, string claimType, string issuer ) : string

Retrieves the value of a claim.

TryGetClaimValue ( this principal, string claimType, string &claimValue ) : bool

Tries to retrieve the value of a claim.

TryGetClaimValue ( this principal, string claimType, string issuer, string &claimValue ) : bool

Tries to retrieve the value of a claim.

Method Details

ClaimExists() public static method

Checks whether a given claim exists
public static ClaimExists ( this principal, Predicate predicate ) : bool
principal this The principal.
predicate Predicate The search predicate.
return bool

ClaimExists() public static method

Checks whether a given claim exists
public static ClaimExists ( this principal, string claimType ) : bool
principal this The principal.
claimType string Type of the claim.
return bool

ClaimExists() public static method

Checks whether a given claim exists.
public static ClaimExists ( this principal, string claimType, string value ) : bool
principal this The principal.
claimType string Type of the claim.
value string The value.
return bool

ClaimExists() public static method

Checks whether a given claim exists.
public static ClaimExists ( this principal, string claimType, string value, string issuer ) : bool
principal this The principal.
claimType string Type of the claim.
value string The value.
issuer string The issuer.
return bool

First() public static method

Retrieves the first identity of an IClaimsPrincipal.
public static First ( this principal ) : IClaimsIdentity
principal this The principal.
return IClaimsIdentity

GetClaimValue() public static method

Retrieves the value of a claim.
public static GetClaimValue ( this principal, string claimType ) : string
principal this The principal.
claimType string Type of the claim.
return string

GetClaimValue() public static method

Retrieves the value of a claim.
public static GetClaimValue ( this principal, string claimType, string issuer ) : string
principal this The principal.
claimType string Type of the claim.
issuer string The issuer.
return string

TryGetClaimValue() public static method

Tries to retrieve the value of a claim.
public static TryGetClaimValue ( this principal, string claimType, string &claimValue ) : bool
principal this The principal.
claimType string Type of the claim.
claimValue string The claim value.
return bool

TryGetClaimValue() public static method

Tries to retrieve the value of a claim.
public static TryGetClaimValue ( this principal, string claimType, string issuer, string &claimValue ) : bool
principal this The principal.
claimType string Type of the claim.
issuer string The issuer.
claimValue string The claim value.
return bool