File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 16
16
],
17
17
"require" : {
18
18
"silverstripe/framework" : " ^5" ,
19
- "level51/silverstripe-jwt-utils" : " ^0.2 "
19
+ "level51/silverstripe-jwt-utils" : " ^1.0 "
20
20
},
21
21
"require-dev" : {
22
22
"phpunit/phpunit" : " ^5.7" ,
Original file line number Diff line number Diff line change 3
3
namespace FullscreenInteractive \Restful \Controllers ;
4
4
5
5
use Firebase \JWT \JWT ;
6
+ use Firebase \JWT \Key ;
6
7
use Level51 \JWTUtils \JWTUtils ;
7
8
use SilverStripe \Control \Controller ;
8
9
use SilverStripe \Control \HTTPResponse ;
@@ -228,8 +229,11 @@ public function ensureUserLoggedIn($permissionCodes = [])
228
229
{
229
230
$ token = JWT ::decode (
230
231
$ this ->getJwt (),
231
- Config::inst ()->get (JWTUtils::class, 'secret ' ),
232
- ['HS256 ' ]);
232
+ new Key (
233
+ Config::inst ()->get (JWTUtils::class, 'secret ' ),
234
+ 'HS256 '
235
+ )
236
+ );
233
237
234
238
$ member = Member::get ()->byID ($ token ->memberId );
235
239
You can’t perform that action at this time.
0 commit comments