mirror of
https://github.com/bitwarden/server.git
synced 2025-04-16 10:38:17 -05:00
allow configuring the validation urls for yubico otp servers
This commit is contained in:
parent
4a67780b3e
commit
d5aa7b5624
@ -179,6 +179,7 @@ namespace Bit.Core
|
|||||||
{
|
{
|
||||||
public string ClientId { get; set; }
|
public string ClientId { get; set; }
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
|
public string[] ValidationUrls { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DuoSettings
|
public class DuoSettings
|
||||||
|
@ -67,6 +67,10 @@ namespace Bit.Core.Identity
|
|||||||
}
|
}
|
||||||
|
|
||||||
var client = new YubicoClient(_globalSettings.Yubico.ClientId, _globalSettings.Yubico.Key);
|
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);
|
var response = await client.VerifyAsync(token);
|
||||||
return response.Status == YubicoResponseStatus.Ok;
|
return response.Status == YubicoResponseStatus.Ok;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user