Different Cookie Expiry Times

70 views
Skip to first unread message

Rik Thomas

unread,
May 12, 2014, 12:13:30 PM5/12/14
to google-authentica...@googlegroups.com

I would like to authenticate two different groups.

1. Authentication cookie is valid for 2 hours
2. Authentication cookie is valid for 10 minutes

However, they need to be accessing the same directory.

The following only works for users in the second /etc/apache2/shortauth directory; the /etc/apache2/longauth users are denied.

 <Directory /home/test/www>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride All
   Order deny,allow
   Allow from all
   AuthType Basic

   AuthName "My Test"
   AuthBasicProvider "google_authenticator"
   Require valid-user
   GoogleAuthUserPath /etc/apache2/longauth
   GoogleAuthCookieLife 7200
   GoogleAuthEntryWindow 1
 
</Directory>

 <Directory /home/test/www>
   Options Indexes FollowSymLinks MultiViews
   AllowOverride All
   Order deny,allow
   Allow from all
   AuthType Basic

   AuthName "My Test"
   AuthBasicProvider "google_authenticator"
   Require valid-user
   GoogleAuthUserPath /etc/apache2/shortauth
   GoogleAuthCookieLife 600
   GoogleAuthEntryWindow 3
 
</Directory>


The only way I can think around this at the moment is to create a new directory for the other user group and symlink it to the actual directory which seems rather inelegant. Is there a better way?

Brad Goodman

unread,
May 12, 2014, 1:54:35 PM5/12/14
to Rik Thomas, google-authentica...@googlegroups.com
Not as it stands now. I could see putting an "authentication time" field in the user's credential file - if that's desired - granted, it's not there now.


--
You received this message because you are subscribed to the Google Groups "google-authenticator-apache-module" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-authenticator-ap...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rik Thomas

unread,
Nov 9, 2014, 2:43:27 PM11/9/14
to google-authentica...@googlegroups.com, rickee...@gmail.com, br...@bradgoodman.com
Hi Brad

I find your module really useful - thank you. By way of a feature request, could I ask for a function to set the cookie expiry time on a per user basis in their secret key file rather than setting it globally in the host config?

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to google-authenticator-apache-module+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages