Work on timeout on idsrv and mvc app
This commit is contained in:
parent
4509153ca2
commit
a064795314
@ -58,7 +58,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"marketing",
|
||||
"webshoppingagg",
|
||||
"orders.signalrhub"
|
||||
}
|
||||
},
|
||||
},
|
||||
new Client
|
||||
{
|
||||
@ -124,6 +124,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"webshoppingagg",
|
||||
"orders.signalrhub"
|
||||
},
|
||||
AccessTokenLifetime = 60*60*2, // 2 hours
|
||||
IdentityTokenLifetime= 60*60*2 // 2 hours
|
||||
},
|
||||
new Client
|
||||
{
|
||||
@ -248,7 +250,6 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration
|
||||
"webshoppingagg"
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,11 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
||||
var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
|
||||
|
||||
// Adds IdentityServer
|
||||
services.AddIdentityServer(x => x.IssuerUri = "null")
|
||||
services.AddIdentityServer(x =>
|
||||
{
|
||||
x.IssuerUri = "null";
|
||||
x.Authentication.CookieLifetime = TimeSpan.FromHours(2);
|
||||
})
|
||||
.AddSigningCredential(Certificate.Get())
|
||||
.AddAspNetIdentity<ApplicationUser>()
|
||||
.AddConfigurationStore(options =>
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate
|
||||
{
|
||||
using global::Ordering.Domain.Exceptions;
|
||||
using Seedwork;
|
||||
using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -238,7 +238,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
|
||||
})
|
||||
.AddCookie()
|
||||
.AddCookie(setup=>setup.ExpireTimeSpan = TimeSpan.FromHours(2))
|
||||
.AddOpenIdConnect(options =>
|
||||
{
|
||||
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
|
Loading…
x
Reference in New Issue
Block a user