简体   繁体   中英

Error: Lcobucci\JWT\UnencryptedToken cannot implement Lcobucci\JWT\Token - it is not an interface

I have used LexikJWTAuthenticationBundle to implement JWT-based authentication for my Symfony project. I have followed the steps given in a couple of guides and all of them are identical. Following is a one reference link https://symfony.com/bundles/LexikJWTAuthenticationBundle/current/index.html .

After following the given steps I get the following error when trying to get a token and this is coming for all routes which need authentication as well. Anything that I have done wrong here?

在此处输入图像描述

You are probably using a too old version of lcobucci/jwt

Update it.

composer require lcobucci/jwt:^4.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM