我正在尝试安装php。输入以下命令时
composer require firebase/php-jwt
它会给出以下错误。
Using version ^4.0 for firebase/php-jwt
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable s
调用任何api时出现此错误: Argument 3 passed to Lcobucci\\JWT\\Signer\\Hmac::doVerify() must be an instance of Lcobucci\\JWT\\Signer\\Key, null given, called in /app/vendor/lcobucci/jwt/src/Signer/BaseSigner.php on line 44 我正在使用tymondesigns/jwt-auth和laravel进行api身份验证。在生成jwt:secret之后,我尝试运行此php artisan optimize 我
我在我的Laravel5.0.35应用程序上设置了JWT (tymondesigns/jwt-auth)。身份验证非常有效。但是,当我使用jwt.auth中间件时,有一个错误:exception 'ReflectionException' with message 'Class Tymon\JWTAuth\MiddlewareGetUserFromToken does not exist'
(谢谢你的帮助))以下是可能对你有帮助的文件:
app.php
$providers = [
// other records
'Tymon\JWTA
我已经在Lumen(5.8.4)应用程序中以第三方的身份实现了tymon/ jwt -auth版本1.0.0-rc4.1,现在当我继续使用Dingo实现身份验证时,在需要添加https://github.com/dingo/api/wiki/Authentication的步骤中(或者以任何其他方式将jwt注册到dingo) app('Dingo\Api\Auth\Auth')->extend('jwt', function ($app) {
return new Dingo\Api\Auth\Provider\JWT($app['Tymon
我试图在laravel中安装jwt身份验证,但是我使用的是Laravel5.8和JWT,遵循这个,但是显示了这个错误。
我的供应商/tymon/jwt.php/src/jwt.php中有任何问题。
在第182 200行之间
public function parseToken()
{
if (! $token = $this->parser->parseToken()) {
throw new JWTException('The token could not be parsed from the request');
遵循本指南:,我已经正确地安装了tymon/jwt-auth:^1.0@dev。没关系,但是,当我运行:composer require irazasyed/jwt-auth-guard时,会出现这个错误。
composer require irazasyed/jwt-auth-guard
Using version ^1.0 for irazasyed/jwt-auth-guard
./composer.json has been updated
Running composer update irazasyed/jwt-auth-guard
Loading composer reposit
我有一个具有传统web应用程序和带有JWT的RestAPI的应用程序,我有一个名为JwtFilter的过滤器,它的别名是jwt,但是它在所有api/*路由上工作,我不想在api/auth/login和api/auth/寄存器上应用,但是我找不到方法。我的auth过滤器(用于WebApp )运行得很好,与jwt有问题。
Filter.php
<?php
namespace Config;
use App\Filters\AuthFilter;
use App\Filters\JwtFilter;
use CodeIgniter\Config\BaseConfig;
use CodeIg
我正在从事一个rest项目。
我在为一个问题而挣扎。当我得到令牌过期错误时,生成的代码如下所示:
public function authenticate(Request $request){
$this->checkForToken($request);
try {
if (! $this->auth->parseToken()->authenticate()) {
throw new UnauthorizedHttpException('jwt-auth', 'User not fou
当我尝试登录时,我会得到以下错误,但我找不到问题所在。我用的是管腔9和php 8.1。
<!-- Lcobucci\JWT\Token\Builder::relatedTo(): Argument #1 ($subject) must be of type string, null given, called in /home/ss20nt22/public_html/wms/vendor/php-open-source-saver/jwt-auth/src/Providers/JWT/Lcobucci.php on line 212 (500 Internal Server Error