mirror of
https://github.com/bitwarden/server.git
synced 2026-02-05 00:23:24 +08:00
[PM-1632] Redirect on SsoRequired - return SsoOrganizationIdentifier (#6597)
feat: add SSO request validation and organization identifier lookup - Implement SsoRequestValidator to validate SSO requirements - Add UserSsoOrganizationIdentifierQuery to fetch organization identifiers - Create SsoOrganizationIdentifier custom response for SSO redirects - Add feature flag (RedirectOnSsoRequired) for gradual rollout - Register validators and queries in dependency injection - Create RequestValidationConstants to reduce magic strings - Add comprehensive test coverage for validation logic - Update BaseRequestValidator to consume SsoRequestValidator
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
using Bit.Core.Auth.Sso;
|
||||
using Bit.Core.Auth.UserFeatures.DeviceTrust;
|
||||
using Bit.Core.Auth.UserFeatures.Registration;
|
||||
using Bit.Core.Auth.UserFeatures.Registration.Implementations;
|
||||
@@ -29,6 +28,7 @@ public static class UserServiceCollectionExtensions
|
||||
services.AddWebAuthnLoginCommands();
|
||||
services.AddTdeOffboardingPasswordCommands();
|
||||
services.AddTwoFactorQueries();
|
||||
services.AddSsoQueries();
|
||||
}
|
||||
|
||||
public static void AddDeviceTrustCommands(this IServiceCollection services)
|
||||
@@ -69,4 +69,9 @@ public static class UserServiceCollectionExtensions
|
||||
{
|
||||
services.AddScoped<ITwoFactorIsEnabledQuery, TwoFactorIsEnabledQuery>();
|
||||
}
|
||||
|
||||
private static void AddSsoQueries(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<IUserSsoOrganizationIdentifierQuery, UserSsoOrganizationIdentifierQuery>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user