I am building an app, which is a Javascript SPA with Asp.net mvc controllers in the backend. I am trying to use IdentityServer for authentication. I have authorize attribute on my controllers. One of the requirements I have is that the user's session should be expired in a certain amount of time(if no activity, user should be prompted to login). The implicit flow does not work for me because of security restrictions. I grabbed the Identity4 samples https://github.com/IdentityServer/IdentityServer4.Samples and tried using the cookieauthentication middleware, setting the ExpireTimeSpan to see if that expires the cookie. Somehow even after the expiration of the timespan specified, I am still able to make a call into the controllers. How can I accomplish something similar to a asp.net session timeout with Identity Server and Asp.net mvc?
相关问题
- Can I use MvcJsonOptions configured during Startup
- Singleton with AsyncLocal vs Scope Service
- gRPC client do not dispose Channel
- Unable to resolve service for type 'Microsoft.
- Which encryption algorithm do we use in Asp.net 5
相关文章
- 商城项目使用了identityServer4 , 那么客户余额等特殊信息该怎么处理。
- vue 使用 oidc-client 连接IdentityServer4
- dotnet core3.1 ocleot集成IdentityServer4 error:" Cl
- EF Core 'another instance is already being tra
- Re-target .NET Core to net471, net 472
- How to replace Middleware in integration tests pro
- Why CsvHelper not reading from MemoryStream?
- How to define function that returns html in asp.ne
It is known issue see https://github.com/aspnet/Security/pull/893, fixed for 1.1.0.
Wait 1.1.0 version or use
OnTokenValidated
to set expire property:Also see for another solution: https://github.com/aspnet/Security/issues/855#issuecomment-229495399