feat(api): аутентификация, отключен кастомный BaseSimpleRoleProvider, роли добавляются в ParrAuthenticationHandler
This commit is contained in:
@@ -35,7 +35,8 @@ builder.Services.AddDallSettings(builder.Configuration);
|
||||
// Auth
|
||||
builder.Services.AddAuthentication(ParrAuthenticationOptions.DefaultScheme)
|
||||
.AddScheme<ParrAuthenticationOptions, ParrAuthenticationHandler>(ParrAuthenticationOptions.DefaultScheme, opt => { });
|
||||
builder.Services.AddSimpleRoleAuthorization<BaseSimpleRoleProvider>();
|
||||
// не используем, так как проверка ролей остается прежней, а роли подставляем в ParrAuthenticationHandler
|
||||
//builder.Services.AddSimpleRoleAuthorization<BaseSimpleRoleProvider>();
|
||||
|
||||
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
|
||||
Reference in New Issue
Block a user