From 66faeaab504e35bf8896014110da681876491333 Mon Sep 17 00:00:00 2001 From: ryannjohnson Date: Wed, 27 Jan 2016 15:55:28 -0800 Subject: [PATCH] Conform to 5.2's Authenticatable contract Laravel 5.2 introduced the `getAuthIdentifierName` abstract function in its Authenticatable contract, throwing an error if `AuthJWTUser` is used to authenticate. --- src/Auth0/Login/Auth0JWTUser.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Auth0/Login/Auth0JWTUser.php b/src/Auth0/Login/Auth0JWTUser.php index 0b612fa5..7f0e041a 100644 --- a/src/Auth0/Login/Auth0JWTUser.php +++ b/src/Auth0/Login/Auth0JWTUser.php @@ -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. *