Skip to content

Commit 9525989

Browse files
committed
Merge pull request #4 from leoruhland/patch-1
Fixed JWT namespace
2 parents e40c888 + d0f4a8d commit 9525989

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Controller/Api/UsersController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Api\Controller\AppController;
66
use Cake\Network\Exception\UnauthorizedException;
77
use Cake\Utility\Security;
8+
use \Firebase\JWT\JWT;
89

910
/**
1011
* Users Controller
@@ -31,7 +32,7 @@ public function token()
3132

3233
$this->set('data', [
3334
'user' => $user,
34-
'token' => $token = \JWT::encode([
35+
'token' => $token = JWT::encode([
3536
'id' => $user['id'],
3637
'user' => $user,
3738
'exp' => time() + 604800

0 commit comments

Comments
 (0)