Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​IdentityModel.​Tokens.​CaseSensitiveClaimsIdentity

Assembly: Microsoft.IdentityModel.Tokens

Inheritance: object → System.​Security.​Claims.​ClaimsIdentity → CaseSensitiveClaimsIdentity

Implemented Interfaces

A derived <see cref="T:System.Security.Claims.ClaimsIdentity" /> where claim retrieval is case-sensitive. The current <see cref="T:System.Security.Claims.ClaimsIdentity" /> retrieves claims in a case-insensitive manner which is different than querying the underlying <see cref="P:Microsoft.IdentityModel.Tokens.CaseSensitiveClaimsIdentity.SecurityToken" /> . The <see cref="T:Microsoft.IdentityModel.Tokens.CaseSensitiveClaimsIdentity" /> provides consistent retrieval logic between the <see cref="P:Microsoft.IdentityModel.Tokens.CaseSensitiveClaimsIdentity.SecurityToken" /> and <see cref="T:System.Security.Claims.ClaimsIdentity" /> .

Properties

public SecurityToken
SecurityToken
Gets the <see cref="P:Microsoft.IdentityModel.Tokens.CaseSensitiveClaimsIdentity.SecurityToken" /> associated with this claims identity.
public string
AuthenticationType
public object
BootstrapContext
protected byte[]
CustomSerializationData
public bool
IsAuthenticated
public string
Label
public string
Name
public string
NameClaimType
public string
RoleClaimType

Methods

FindAll​(string type)
Retrieves a <see cref="T:System.Collections.Generic.IEnumerable`1" /> where each <see cref="P:System.Security.Claims.Claim.Type" /> equals <paramref name="type" /> .
Returns A <see cref="T:System.Collections.Generic.IEnumerable`1" /> of matched claims.
type The type of the claim to match.
Remarks Comparison is <see cref="F:System.StringComparison.Ordinal" /> .
FindFirst​(string type)
Retrieves the first <see cref="T:System.Security.Claims.Claim" /> where <see cref="P:System.Security.Claims.Claim.Type" /> equals <paramref name="type" /> .
Returns A <see cref="T:System.Security.Claims.Claim" /> , <see langword="null" /> if nothing matches.
type The type of the claim to match.
Remarks Comparison is <see cref="F:System.StringComparison.Ordinal" /> .
public bool
HasClaim​(string type, string value)
Determines if a claim with type AND value is contained within this claims identity.
Returns <c>true</c> if a claim is matched, <c>false</c> otherwise.
type The type of the claim to match.
value The value of the claim to match.
Remarks Comparison is <see cref="F:System.StringComparison.Ordinal" /> for <see cref="P:System.Security.Claims.Claim.Type" /> and <see cref="P:System.Security.Claims.Claim.Value" /> .
public bool
TryRemoveClaim​(System.​Security.​Claims.​Claim claim)
public void
WriteTo​(System.​IO.​BinaryWriter writer)
protected void
WriteTo​(System.​IO.​BinaryWriter writer, byte[] userData)
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object