FeatureToggle icon indicating copy to clipboard operation
FeatureToggle copied to clipboard

Claims based toggles

Open samholder opened this issue 9 years ago • 2 comments

We have been using a couple of toggles based on Claims. I am considering a PR to add these into the core library. These would be ClaimExistsFeatureToggle, which checks if a claim with a given name exists in the current users identity, and ClaimHasValueFeatureToggle which checks if a claim exists and if it does, does it have the particular value specified. If so the then toggle returns true.

Would this be something that would be wanted in the library, or would I be wasting my time?

samholder avatar May 20 '16 09:05 samholder

Hi @samholder - thanks for the idea, sounds like an interesting idea, let me have a think and get back to you - what additional dependencies would this add?

jason-roberts avatar May 23 '16 02:05 jason-roberts

This would add a dependency on System.Security.Claims which is part of the core since .net 4.5 and in in mscorelib. I don't know if you want to support older versions of the framework than that...

samholder avatar May 23 '16 06:05 samholder