feat(api): аутентификация, отключен кастомный BaseSimpleRoleProvider, роли добавляются в ParrAuthenticationHandler
This commit is contained in:
@@ -46,6 +46,8 @@ namespace PARR.API.Authentication
|
||||
var claims = new List<Claim> {
|
||||
new Claim(ClaimTypes.Name, user.UserIp)
|
||||
};
|
||||
// добавляем роли
|
||||
user.Roles.ForEach(r => claims.Add(new Claim(ClaimTypes.Role, r.Name)));
|
||||
|
||||
var claimsIdentity = new ClaimsIdentity(claims, Scheme.Name);
|
||||
var claimsPrincipal = new ClaimsPrincipal(claimsIdentity);
|
||||
|
||||
Reference in New Issue
Block a user