Jump to content

NTLM Authentication - Clear Authenticated Sessions


stealth86

Recommended Posts

I'm working on an intranet site that uses NTLM authentication. Authentication is handled with the mod_auth_sspi module for apache. It works fine, but the browser caches the authenticated session until you manually clear it or shut down the browser.

 

Is there any good way to clear this cache from code? I've seen a java script call that will clear all authenticated sessions from IE, but I'd really like to only remove the one. I've also seen a bit of javascript code to try and insert bogus information to the cache, but this seems pretty unreliable.

 

Is there a way to clear a single entry out of the authentication cache using php? (Firefox/IE) More fundamentally, are there better libraries for apache (or php) to do NTLM with? (I run apache in Windows.)

 

Thanks!

Link to comment
Share on other sites

if its a php session ($_SESSION) you can clear it by saying

<?php
session_start();
$_SESSION['CLEARME'] = "";
?>

Cookies can be set to delete

 

Also you can set your page headers to be no-cache to help

 

NTLM doesn't actually use cookies or PHP sessions :D. Also, its not a problem that individual pages are cached, its a problem that the users credentials are cached and there doesn't seem to be a way to delete these from PHP.

 

I ran across a bug report on this issue in Firefox, and it seems like this just might be impossible. Can anyone confirm or deny this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.