mirror of
https://github.com/bitwarden/server
synced 2025-12-31 07:33:43 +00:00
allow configuring the validation urls for yubico otp servers
This commit is contained in:
@@ -67,6 +67,10 @@ namespace Bit.Core.Identity
|
||||
}
|
||||
|
||||
var client = new YubicoClient(_globalSettings.Yubico.ClientId, _globalSettings.Yubico.Key);
|
||||
if(_globalSettings.Yubico.ValidationUrls != null && _globalSettings.Yubico.ValidationUrls.Length > 0)
|
||||
{
|
||||
client.SetUrls(_globalSettings.Yubico.ValidationUrls);
|
||||
}
|
||||
var response = await client.VerifyAsync(token);
|
||||
return response.Status == YubicoResponseStatus.Ok;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user