Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I increase session timeout with W.I.F / SAML tokens / FedAuth cookie

Tags:

wif

I think the default timeout is something like every half hour.

I'd like to change this to 2 weeks. Anyone got any ideas?

Is this done usually from the STS side or the client side? Is forms authentication getting in the way too, or is that now irrelevant?

like image 918
Jonathon Kresner Avatar asked Mar 27 '11 21:03

Jonathon Kresner


2 Answers

I just fixed this myself, persistentCookiesOnPassiveRedirects needs to be enabled on the RP

In your web.config you need:

<microsoft.identityModel>
      <federatedAuthentication>
        <wsFederation
            persistentCookiesOnPassiveRedirects="true" />
        <cookieHandler 
          persistentSessionLifetime="60.0:0:0" />
      </federatedAuthentication>
</microsoft.identityModel>
like image 67
Chad Grant Avatar answered Nov 06 '22 15:11

Chad Grant


The timeout for the FedAuth token may be managed in the web.config for the claims-aware application. An example with documentation may be found here. Keep in mind, though, that there is the STS-side of the coin and that the timeout may need to be increased there as well to prevent the user from having to sign-in again when moving from one application to another after an extended period.

like image 43
Bobby D Avatar answered Nov 06 '22 17:11

Bobby D