Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

OWIN Authentication, ExpireTimeSpan not working

$
0
0

Hi ,

I am using Owin Authentication. I want my application to redirect to login page after specified time. So i have set the expiration time in CookieAuthenticationOptions.

Here is my code.

app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);

app.UseCookieAuthentication(new CookieAuthenticationOptions
{
       ExpireTimeSpan = TimeSpan.FromMinutes(2.0),
       SlidingExpiration = false
});

I am able to browse through the application even after 2 mins  of login and no login page redirection is seen .

My code is similar to the thread "OWIN Authentication and timeout with redirection". I have tried the fix in this thread but it didn't work.


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>