diff --git a/WorkFlow.API/Program.cs b/WorkFlow.API/Program.cs index 09f5062..951cde6 100644 --- a/WorkFlow.API/Program.cs +++ b/WorkFlow.API/Program.cs @@ -27,6 +27,9 @@ builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationSc options.Cookie.SameSite = SameSiteMode.Strict; // Protects against CSRF attacks by restricting how cookies are sent with requests from external sites options.LoginPath = "/api/auth/login"; options.LogoutPath = "/api/auth/logout"; + options.ExpireTimeSpan = TimeSpan.FromMinutes(60); // timeout. + options.SlidingExpiration = true; //refreshes the expiration time on each request. + options.Cookie.Name = "AuthSession"; }); builder.Services.AddEndpointsApiExplorer(); diff --git a/WorkFlow.API/appsettings.json b/WorkFlow.API/appsettings.json index f5166d5..89037e4 100644 --- a/WorkFlow.API/appsettings.json +++ b/WorkFlow.API/appsettings.json @@ -9,7 +9,7 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=g+2edXEbMbujCUjh7INZRQ==;Password=Bz/n9pu8EyzlVqicaMRQGQ==;Encrypt=false;TrustServerCertificate=True;" + "Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;" }, "DirectorySearchOptions": { "ServerName": "DD-VMP01-DC01",