Update v1.0.6.5
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Providers\Auth;
|
||||
|
||||
interface AuthInterface
|
||||
{
|
||||
/**
|
||||
* Check a user's credentials
|
||||
* Check a user's credentials.
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return bool
|
||||
@@ -13,7 +22,7 @@ interface AuthInterface
|
||||
public function byCredentials(array $credentials = []);
|
||||
|
||||
/**
|
||||
* Authenticate a user via the id
|
||||
* Authenticate a user via the id.
|
||||
*
|
||||
* @param mixed $id
|
||||
* @return bool
|
||||
@@ -21,7 +30,7 @@ interface AuthInterface
|
||||
public function byId($id);
|
||||
|
||||
/**
|
||||
* Get the currently authenticated user
|
||||
* Get the currently authenticated user.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Tymon\JWTAuth\Providers\Auth;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Auth\AuthManager;
|
||||
|
||||
class IlluminateAuthAdapter implements AuthInterface
|
||||
@@ -21,7 +29,7 @@ class IlluminateAuthAdapter implements AuthInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Check a user's credentials
|
||||
* Check a user's credentials.
|
||||
*
|
||||
* @param array $credentials
|
||||
* @return bool
|
||||
@@ -32,22 +40,18 @@ class IlluminateAuthAdapter implements AuthInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate a user via the id
|
||||
* Authenticate a user via the id.
|
||||
*
|
||||
* @param mixed $id
|
||||
* @return bool
|
||||
*/
|
||||
public function byId($id)
|
||||
{
|
||||
try {
|
||||
return $this->auth->onceUsingId($id);
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
return $this->auth->onceUsingId($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the currently authenticated user
|
||||
* Get the currently authenticated user.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user