简体   繁体   English

错误:Lcobucci\JWT\UnencryptedToken 无法实现 Lcobucci\JWT\Token - 它不是接口

[英]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.

相关问题 JWT 和 PHP:验证传递的令牌 (Lcobucci\\JWT) - JWT and PHP: Validating a passed token (Lcobucci\JWT) Jwt 身份验证错误参数 3 传递给 Lcobucci\JWT\Signer\Hmac::doVerify() - Jwt Authentication error Argument 3 passed to Lcobucci\JWT\Signer\Hmac::doVerify() Laravel 护照:Lcobucci\JWT\Token\InvalidTokenStructure 值不是允许的日期格式 - Laravel passport: Lcobucci\JWT\Token\InvalidTokenStructure Value is not in the allowed date format Laravel 8 供应商/lcobucci/jwt/src/Configuration.php 错误 - Laravel 8 error on vendor/lcobucci/jwt/src/Configuration.php Laravel:目标 [Lcobucci\JWT\Parser] 不可实例化 - Laravel: Target [Lcobucci\JWT\Parser] is not instantiable Passport中不存在Lcobucci \\\\ JWT \\\\ Parser类(Laravel 5.6) - Class Lcobucci\\JWT\\Parser does not exist in Passport (Laravel 5.6) 将 lcobucci/jwt 从 3.x 升级到 4.x:使用 $currentTime 迁移 ValidationData - Upgrading lcobucci/jwt from 3.x to 4.x: migrating ValidationData with $currentTime 不推荐将声明复制为标头,并将从 v4.0 中删除 - Laravel lcobucci/jwt package 中的护照问题 - Replicating claims as headers is deprecated and will removed from v4.0 - Laravel Passport Problem in lcobucci/jwt package 使用JWT创建令牌时出错 - Error when creating token with JWT BulletPHP框架和Firebase / JWT-检查令牌错误 - BulletPHP framework and Firebase/JWT - Checking token error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM