Closed sommmen closed 6 months ago
Sorry, I missed this issue when you first posted it. This is unsupportable, claims don't have a type once created, they're just strings. I'd recommend writing an extension that removes the claim and adds the change you want (claims can be removed & added as part of the same scenario).
Hi,
I have role based authorization, my claims would look like this;
In a test i'd like to remove this role so i can test that asp.net correctly returns Forbidden, but i can't seem to get that to work becuase i can only remove a claim by key;
Could Alba support configuring the claim values on a per test basis? In my case i'd like to only remove the 'Employee' role.
For the sake of completeness, the Host is setup in a base class, using MsTest :
I may be able to push out a PR, if you'd like me to do that, please provide me some steps on how you want this to work.