[英]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.我已使用LexikJWTAuthenticationBundle为我的 Symfony 项目实现基于 JWT 的身份验证。 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 .
以下是一个参考链接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
您可能使用的
lcobucci/jwt
版本太旧
Update it.更新它。
composer require lcobucci/jwt:^4.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.