mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05: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