Adding roles from a DB Table

Posted by Sunil Ramu on Stack Overflow See other posts from Stack Overflow or by Sunil Ramu
Published on 2010-06-17T06:47:50Z Indexed on 2010/06/17 6:53 UTC
Read the original article Hit count: 250

Filed under:
|

Can anyone expalin me how to dynamically ger the Role from a DB table instead of hard coding it in the code.

ClaimsIdentity outputIdentity = new ClaimsIdentity(); outputIdentity.Claims.Add(new Claim(System.IdentityModel.Claims.ClaimTypes.Name, principal.Identity.Name)); outputIdentity.Claims.Add(new Claim(ClaimTypes.Role, "Manager")); outputIdentity.Claims.Add(new Claim(ClaimTypes.Country, HttpUtilities.GetProgramIdentifierFromUrl())); return outputIdentity;

© Stack Overflow or respective owner

Related posts about .NET

Related posts about WIF