Closed whoiskevinrich closed 8 years ago
You can specify any claim you'd like. Stuntman doesn't have the concept of roles baked in. But, if your roles are managed by claims, you could add the role
claim for each role you wish to apply to a StuntmanUser
.
new StuntmanOptions()
.AddUser(new StuntmanUser("user-1", "User 1")
.AddClaim("given_name", "John")
.AddClaim("family_name", "Doe")
.AddClaim("role", "StandardUser")
.AddClaim("role", "Administrator"));
This may or may not be a useful claim for your use case: https://msdn.microsoft.com/en-us/library/system.security.claims.claimtypes.role(v=vs.110).aspx
Great, that throws me in the right direction. Our intranet projects typically use Windows Authentication and Stuntman would certainly be an answer to an ongoing issue that we have. :)
On Tue, Feb 2, 2016 at 1:16 PM Ken Dale notifications@github.com wrote:
This may or may not be a useful claim for your use case: https://msdn.microsoft.com/en-us/library/system.security.claims.claimtypes.role(v=vs.110).aspx
— Reply to this email directly or view it on GitHub https://github.com/ritterim/stuntman/issues/101#issuecomment-178824830.
I'm new to claims in general, but believe in TDD. I was wondering how I can give a StuntmanUser a claim for multiple roles? Is there a list of supported claims?