0

While logging in via the API, I get back some cookies from the Wikimedia framework:

mywikiUserName=myusername;
mywiki_session=a27c625a1babc58ad7cc11e317c9eed2;
mywikiLoggedOut=20120723255540";

I wonder what the mywikiLoggedOut=20120723211540 is about?

I havn't found documentation regarding this, so any help is appreciated.

brainray
  • 12,512
  • 11
  • 67
  • 116
  • Why do you even care? You should just send the cookies back to the server and not care what's in them. – svick Jul 24 '12 at 08:35
  • Well, I do not send all of them back, just the required ones. And, isn't it better to know what I'm working with? e.g. the __atuvc has restrictions in the EU. – brainray Jul 24 '12 at 08:46

1 Answers1

2

Doing a simple git grep on the MediaWiki repository will point you to the doLogout() function in includes/User.php:

/**
 * Clear the user's cookies and session, and reset the instance cache.
 * @see logout()
 */
public function doLogout() {
    $this->clearInstanceCache( 'defaults' );

    $this->getRequest()->setSessionData( 'wsUserID', 0 );

    $this->clearCookie( 'UserID' );
    $this->clearCookie( 'Token' );

    # Remember when user logged out, to prevent seeing cached pages
    $this->setCookie( 'LoggedOut', wfTimestampNow(), time() + 86400 );
}

The code of the function and the comment make it clear that this cookie indicates when you last logged out and is used to control caching of pages (presumably so that the pages don't look like you were still logged in after you log out).

svick
  • 236,525
  • 50
  • 385
  • 514