mirror of
https://github.com/bitwarden/server.git
synced 2025-04-08 06:28:14 -05:00
check duo keys on org config as well
This commit is contained in:
parent
4ad1634d1d
commit
20e3963847
@ -201,6 +201,16 @@ namespace Bit.Api.Controllers
|
|||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var duoApi = new DuoApi(model.IntegrationKey, model.SecretKey, model.Host);
|
||||||
|
duoApi.JSONApiCall<object>("GET", "/auth/v2/check");
|
||||||
|
}
|
||||||
|
catch(DuoException)
|
||||||
|
{
|
||||||
|
throw new BadRequestException("Duo configuration settings are not valid. Please re-check the Duo Admin panel.");
|
||||||
|
}
|
||||||
|
|
||||||
model.ToOrganization(organization);
|
model.ToOrganization(organization);
|
||||||
await _organizationService.UpdateTwoFactorProviderAsync(organization,
|
await _organizationService.UpdateTwoFactorProviderAsync(organization,
|
||||||
TwoFactorProviderType.OrganizationDuo);
|
TwoFactorProviderType.OrganizationDuo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user