File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1616 "require" : {
1717 "php" : " ^8.0" ,
1818 "ext-json" : " *" ,
19- "firebase/php-jwt" : " ^6.3.1 " ,
19+ "firebase/php-jwt" : " ^6.4 " ,
2020 "illuminate/auth" : " ^9.0|^10.0" ,
2121 "illuminate/console" : " ^9.0|^10.0" ,
2222 "illuminate/container" : " ^9.0|^10.0" ,
2626 "illuminate/encryption" : " ^9.0|^10.0" ,
2727 "illuminate/http" : " ^9.0|^10.0" ,
2828 "illuminate/support" : " ^9.0|^10.0" ,
29- "lcobucci/jwt" : " ^3.4|^4 .0" ,
30- "league/oauth2-server" : " ^8.2 " ,
31- "nyholm/psr7" : " ^1.3 " ,
29+ "lcobucci/jwt" : " ^4.3|^5 .0" ,
30+ "league/oauth2-server" : " ^8.5.1 " ,
31+ "nyholm/psr7" : " ^1.5 " ,
3232 "phpseclib/phpseclib" : " ^2.0|^3.0" ,
33- "symfony/psr-http-message-bridge" : " ^2.0 "
33+ "symfony/psr-http-message-bridge" : " ^2.1 "
3434 },
3535 "require-dev" : {
3636 "mockery/mockery" : " ^1.0" ,
Original file line number Diff line number Diff line change 1616use Laravel \Passport \Bridge \RefreshTokenRepository ;
1717use Laravel \Passport \Guards \TokenGuard ;
1818use Laravel \Passport \Http \Controllers \AuthorizationController ;
19- use Lcobucci \JWT \Configuration ;
20- use Lcobucci \JWT \Parser ;
19+ use Lcobucci \JWT \Encoding \JoseEncoder ;
20+ use Lcobucci \JWT \Parser as ParserContract ;
21+ use Lcobucci \JWT \Token \Parser ;
2122use League \OAuth2 \Server \AuthorizationServer ;
2223use League \OAuth2 \Server \CryptKey ;
2324use League \OAuth2 \Server \Grant \AuthCodeGrant ;
@@ -294,8 +295,8 @@ protected function registerClientRepository()
294295 */
295296 protected function registerJWTParser ()
296297 {
297- $ this ->app ->singleton (Parser ::class, function () {
298- return Configuration:: forUnsecuredSigner ()-> parser ( );
298+ $ this ->app ->singleton (ParserContract ::class, function () {
299+ return new Parser ( new JoseEncoder );
299300 });
300301 }
301302
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function test_access_token_can_be_created()
4242 $ parsedToken = new PlainToken (
4343 new DataSet ([], '' ),
4444 new DataSet ([RegisteredClaims::ID => 'token ' ], '' ),
45- Signature:: fromEmptyData ( )
45+ new Signature ( '' , '' )
4646 );
4747
4848 $ jwt ->shouldReceive ('parse ' )->with ('foo ' )->andReturn ($ parsedToken );
You can’t perform that action at this time.
0 commit comments