mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Check the authentication cookie every 5 min rather than 30min
This commit is contained in:
parent
e6938cef6f
commit
1fc114fec7
2 changed files with 14 additions and 1 deletions
|
@ -448,7 +448,6 @@ namespace BTCPayServer.Hosting
|
||||||
private static void AddBtcPayServerAuthenticationSchemes(this IServiceCollection services)
|
private static void AddBtcPayServerAuthenticationSchemes(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddAuthentication()
|
services.AddAuthentication()
|
||||||
.AddCookie()
|
|
||||||
.AddBitpayAuthentication()
|
.AddBitpayAuthentication()
|
||||||
.AddAPIKeyAuthentication();
|
.AddAPIKeyAuthentication();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ using BTCPayServer.Plugins;
|
||||||
using BTCPayServer.Security;
|
using BTCPayServer.Security;
|
||||||
using BTCPayServer.Services.Apps;
|
using BTCPayServer.Services.Apps;
|
||||||
using BTCPayServer.Storage;
|
using BTCPayServer.Storage;
|
||||||
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
@ -53,6 +54,19 @@ namespace BTCPayServer.Hosting
|
||||||
services.AddIdentity<ApplicationUser, IdentityRole>()
|
services.AddIdentity<ApplicationUser, IdentityRole>()
|
||||||
.AddEntityFrameworkStores<ApplicationDbContext>()
|
.AddEntityFrameworkStores<ApplicationDbContext>()
|
||||||
.AddDefaultTokenProviders();
|
.AddDefaultTokenProviders();
|
||||||
|
services.Configure<AuthenticationOptions>(opts =>
|
||||||
|
{
|
||||||
|
opts.DefaultAuthenticateScheme = null;
|
||||||
|
opts.DefaultChallengeScheme = null;
|
||||||
|
opts.DefaultForbidScheme = null;
|
||||||
|
opts.DefaultScheme = IdentityConstants.ApplicationScheme;
|
||||||
|
opts.DefaultSignInScheme = null;
|
||||||
|
opts.DefaultSignOutScheme = null;
|
||||||
|
});
|
||||||
|
services.Configure<SecurityStampValidatorOptions>(opts =>
|
||||||
|
{
|
||||||
|
opts.ValidationInterval = TimeSpan.FromMinutes(5.0);
|
||||||
|
});
|
||||||
|
|
||||||
services.AddBTCPayServer(Configuration);
|
services.AddBTCPayServer(Configuration);
|
||||||
services.AddProviderStorage();
|
services.AddProviderStorage();
|
||||||
|
|
Loading…
Add table
Reference in a new issue