1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-07 22:18:17 -05:00

allow configuring the validation urls for yubico otp servers

This commit is contained in:
Kyle Spearrin 2020-03-03 08:32:50 -05:00
parent 4a67780b3e
commit d5aa7b5624
2 changed files with 5 additions and 0 deletions

View File

@ -179,6 +179,7 @@ namespace Bit.Core
{
public string ClientId { get; set; }
public string Key { get; set; }
public string[] ValidationUrls { get; set; }
}
public class DuoSettings

View File

@ -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;
}