Skip to content

Commit 3e3fd5e

Browse files
committed
Correctly put the ID Token from the TokenAuthenticated middleware in the session
1 parent 6ddd717 commit 3e3fd5e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "coddin-web/oidc-client-laravel-wrapper",
33
"description": "A Laravel wrapper of jumbojett's OpenID Connect Client",
44
"type": "library",
5-
"version": "1.4.1",
5+
"version": "1.4.2",
66
"minimum-stability": "stable",
77
"prefer-stable": true,
88
"require": {

src/Http/Middleware/TokenAuthenticated.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Coddin\OpenIDConnectClient\Service\Token\Storage\TokenStorageAdaptor;
1010
use Illuminate\Http\Request;
1111
use Illuminate\Support\Facades\Log;
12+
use Illuminate\Support\Facades\Session;
1213
use Lcobucci\JWT\Encoding\CannotDecodeContent;
1314
use Lcobucci\JWT\Token\InvalidTokenStructure;
1415
use Lcobucci\JWT\Token\UnsupportedHeaderFound;
@@ -66,7 +67,7 @@ public function handle(Request $request, \Closure $next): mixed
6667
throw new HttpException(Response::HTTP_UNAUTHORIZED);
6768
}
6869

69-
$this->storageAdaptor->put($token);
70+
Session::put(TokenStorageAdaptor::ID_TOKEN_STORAGE_KEY, $token);
7071

7172
return $next($request);
7273
}

0 commit comments

Comments
 (0)