jason-roberts / FeatureToggle

Simple, reliable feature toggles in .NET
http://dontcodetired.com/blog/?tag=/featuretoggle
Apache License 2.0
689 stars 111 forks source link

Claims based toggles #118

Open samholder opened 8 years ago

samholder commented 8 years ago

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?

jason-roberts commented 8 years ago

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?

samholder commented 8 years ago

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...