Table of Contents

Class ClaimsCollection

Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime.dll

A collection contains the user claims Provide methods to check and get the value of a specific claim

public class ClaimsCollection

Inheritance

objectClaimsCollection

Inherited Members

object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Extension Methods

ObjectExtension.ConvertToBsonValue(object), EnumExtensions.DeepClone<ClaimsCollection>(ClaimsCollection)

Constructors

ClaimsCollection(IList<UserClaim>)

public ClaimsCollection(IList<UserClaim> userClaims)

Parameters

userClaims IList<UserClaim>

Properties

UserClaims

Collection of user claims

public IReadOnlyList<UserClaim> UserClaims { get; }

Property Value

IReadOnlyList<UserClaim>

Methods

Contains(string, string)

Check whether a given value and one of its values is in the claim collection or not

public bool Contains(string claim, string value)

Parameters

claim string

The given claim

value string

The give claim value

Returns

bool

True if found, otherwise false

GetClaim(string)

Get the first value of a given claim in the claim collection

public string GetClaim(string claim)

Parameters

claim string

The key

Returns

string

The first claim found by key

GetClaims(string)

Get all values of a given claim in the claim collection.

public IList<string> GetClaims(string claim)

Parameters

claim string

The key

Returns

IList<string>

Has(string)

Check whether a given claim is in the claim collection or not

public bool Has(string claim)

Parameters

claim string

The given claim

Returns

bool

True if found, otherwise false