Skip to content

Commit

Permalink
Conform to 5.2's Authenticatable contract
Browse files Browse the repository at this point in the history
Laravel 5.2 introduced the `getAuthIdentifierName` abstract function in its Authenticatable contract, throwing an error if `AuthJWTUser` is used to authenticate.
  • Loading branch information
ryannjohnson committed Jan 27, 2016
1 parent 0af65fe commit 66faeaa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Auth0/Login/Auth0JWTUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ class Auth0JWTUser implements \Illuminate\Contracts\Auth\Authenticatable {
function __construct ($userInfo) {
$this->userInfo = get_object_vars($userInfo);
}

/**
* Get the unique identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifierName() {
return $this->userInfo['sub'];
}

/**
* Get the unique identifier for the user.
*
Expand Down

0 comments on commit 66faeaa

Please sign in to comment.