}
return false;
}
+
+ public virtual bool HasClaim(string type, string value)
+ {
+ foreach(var claim in Claims){
+ if (claim.Type == type && claim.Value == value)
+ return true;
+ }
+ return false;
+ }
+
+ public virtual Claim FindFirst(string type)
+ {
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ return FindFirst(x => x.Type == type);
+ }
+
+ public virtual IEnumerable<Claim> FindAll(string type)
+ {
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ return FindAll(x => x.Type == type);
+ }
}
}