Reputation: 2933
We are implementing a Secure Token Service (STS) which uses Windows Identity Foundation to provide Claims based authentication and authorisation.
My question is really about best practices and how we should handle multiple roles for a given identity.
When creating claims for a user after they have successfully logged in, we need to be able to add the roles that the user is a member of to the claims before returning to the Relying Party.
The Claim object does not accept a collection of strings so I'm wondering how this should be done. I can think of two ways:
My question is really about which of the above is better, or am I missing something better? Neither solution is perfect as it will require parsing on the other side.
Thanks, John
Upvotes: 0
Views: 941
Reputation: 46773
If you use ADFS as the STS, it inserts multiple roles into the claim
e.g.
etc.
The advantage of this is that WIF can then use the standard IsInRole constructs etc.
Upvotes: 2