Browse Source

Auth token now nulled on logout

Signed-off-by: Joel Marcotte <skaner@gmail.com>
Joel Marcotte 12 years ago
parent
commit
3d51200a88
2 changed files with 2 additions and 3 deletions
  1. 2 0
      laravel/auth/drivers/driver.php
  2. 0 3
      laravel/tests/cases/auth.test.php

+ 2 - 0
laravel/auth/drivers/driver.php

@@ -127,6 +127,8 @@ abstract class Driver {
 		$this->cookie($this->recaller(), null, -2000);
 		$this->cookie($this->recaller(), null, -2000);
 
 
 		Session::forget($this->token());
 		Session::forget($this->token());
+
+    $this->token = null;
 	}
 	}
 
 
 	/**
 	/**

+ 0 - 3
laravel/tests/cases/auth.test.php

@@ -294,9 +294,6 @@ class AuthTest extends PHPUnit_Framework_TestCase {
 
 
 		Auth::logout();
 		Auth::logout();
 
 
-		// A workaround since Cookie will is only stored in memory, until Response class is called.
-		Auth::driver()->token = null;
-
 		$this->assertNull(Auth::user());
 		$this->assertNull(Auth::user());
 
 
 		$this->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login']));
 		$this->assertFalse(isset(Session::$instance->session['data']['laravel_auth_drivers_fluent_login']));