CU Home
Columbia University Information Technology
Creating a Logout Page

Web Design > Creating a Logout Page

Logout Option

When a user logs in on the secure server, the browser typically remembers for a time that the user is logged in with that username and password. This allows the user to navigate the website without having to log in again and again. Typically, the browser forgets this logged-in state when it is closed.

If the user is using a browser at a public terminal or even at a machine that is shared in an office, the user should quit the browser or restart it. However, so that you need not rely on the user remembering to restart the browser, it is a good idea to create a 'logout' option that will cause the browser to clear the user's login state. We highly recommend that you use this option. There is no logout option available for the regular server.

There are two ways to create a logout option.
  • Place a link to the general Columbia logout page
  • Create your own logout page
To use the general Columbia logout page, simply place a link to:

https://www1.columbia.edu/pamacea/logout.html

To create your own customized logout page, follow the steps below:

Place a link directing your users to a page in another directory that you have protected with a .htaccess file. This page is the 'Logout' url and it may have any contents you like; perhaps, 'Thank you for using our service, come again', or any other message you see fit. But it should be protected by a .htaccess file, with only the following line:

AuthKrbLogout

Environment Variables

Our method for authenticating users via a log in provides the following extra environment variables to your cgi scripts and your server-side include documents, for your convenience:
  • USER_TYPE -- either krb (indicates a computer account id or a UNI was used to log in) or udb (indicates a name out of a user-maintained database was used to log in
  • USER_AFFILIATIONS -- list of affiliations and unix groups to which the user belongs
  • USER_EMAIL -- the e-mail address of the user as listed in our directory
You should note that if the USER_TYPE is krb, the REMOTE_USER environment variable will always contain the UNI and not the computer account id. If you have been using REMOTE_USER as a substitute for the e-mail address, this may no longer work. Use USER_EMAIL instead.


« Back to Restricting Access