File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11using ApiIntegrationMvc ;
2+ using ApiIntegrationMvc . Middlewares ;
23using CentralizedLogging . Sdk . Extensions ;
34using Microsoft . AspNetCore . Authentication . Cookies ;
45using Microsoft . AspNetCore . Authorization ;
1213using SharedLibrary . Auth ;
1314using SharedLibrary . Auths ;
1415using SharedLibrary . Cache ;
16+ using StackExchange . Redis ;
1517using UserManagement . Sdk . Extensions ;
1618
1719
4951 {
5052 o . LoginPath = "/Account/Login" ;
5153 o . LogoutPath = "/Account/Logout" ;
52- o . AccessDeniedPath = "/Account /Denied" ;
54+ o . AccessDeniedPath = "/Home/Home /Denied" ;
5355 // optional:
5456 o . SlidingExpiration = true ;
5557 o . ExpireTimeSpan = TimeSpan . FromHours ( 8 ) ;
8082
8183builder . Services . AddScoped < IAuthorizationHandler , PermissionHandler > ( ) ;
8284
83-
8485var app = builder . Build ( ) ;
8586app . UseSerilogRequestLogging ( ) ; // structured request logs
8687
100101app . UseRouting ( ) ;
101102
102103app . UseAuthentication ( ) ;
104+ app . UseMiddleware < EnsurePermissionsCachedMiddleware > ( ) ;
103105app . UseAuthorization ( ) ;
104106
105107app . MapControllerRoute (
You can’t perform that action at this time.
0 commit comments