mirror of
https://github.com/bitwarden/server
synced 2025-12-16 00:03:54 +00:00
web policy for two factor apis
This commit is contained in:
@@ -79,6 +79,15 @@ namespace Bit.Api
|
||||
policy.AddAuthenticationSchemes("Bearer2", "Bearer3");
|
||||
policy.RequireAuthenticatedUser();
|
||||
policy.RequireClaim(JwtClaimTypes.AuthenticationMethod, "Application");
|
||||
policy.RequireClaim(JwtClaimTypes.Scope, "api");
|
||||
});
|
||||
config.AddPolicy("Web", policy =>
|
||||
{
|
||||
policy.AddAuthenticationSchemes("Bearer2", "Bearer3");
|
||||
policy.RequireAuthenticatedUser();
|
||||
policy.RequireClaim(JwtClaimTypes.AuthenticationMethod, "Application");
|
||||
policy.RequireClaim(JwtClaimTypes.Scope, "api");
|
||||
policy.RequireClaim(JwtClaimTypes.ClientId, "web");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user