1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

Add Fido2 to Portal services (#1248)

* Add Fido2 to Portal services

* Add Fido2 to Sso services
This commit is contained in:
Thomas Rittson 2021-03-31 07:13:59 +10:00 committed by GitHub
parent 7b2273c46a
commit ea9849245d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -10,6 +10,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
namespace Bit.Portal
{
@ -60,6 +61,15 @@ namespace Bit.Portal
services.AddDefaultServices(globalSettings);
services.AddCoreLocalizationServices();
// Fido2
services.AddFido2(options =>
{
options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host;
options.ServerName = "Bitwarden";
options.Origin = globalSettings.BaseServiceUri.Vault;
options.TimestampDriftTolerance = 300000;
});
// Mvc
services.AddControllersWithViews()
.AddViewAndDataAnnotationLocalization();

View File

@ -59,6 +59,15 @@ namespace Bit.Sso
});
}
// Fido2
services.AddFido2(options =>
{
options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host;
options.ServerName = "Bitwarden";
options.Origin = globalSettings.BaseServiceUri.Vault;
options.TimestampDriftTolerance = 300000;
});
// Authentication
services.AddDistributedIdentityServices(globalSettings);
services.AddAuthentication()