sizeg / yii2-jwt

A simple Yii2 component to work with JSON Web Token and JSON Web Signature
https://jwt.io/
196 stars 86 forks source link

Setting unknown property: sizeg\jwt\Jwt::key #51

Open mehad022 opened 10 months ago

mehad022 commented 10 months ago

i just moved to sizeg/yii2-jwt: ^4.0-beta. i'ts showing error Setting unknown property: sizeg\jwt\Jwt::key

{ "name": "Unknown Property", "message": "Setting unknown property: sizeg\jwt\Jwt::key", "code": 0, "type": "yii\base\UnknownPropertyException", "file": "/var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/Component.php", "line": 209, "stack-trace": [ "#0 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/BaseYii.php(558): yii\base\Component->set()", "#1 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure()", "#2 [internal function]: yii\base\BaseObject->construct()", "#3 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/di/Container.php(419): ReflectionClass->newInstanceArgs()", "#4 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build()", "#5 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get()", "#6 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject()", "#7 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/Module.php(766): yii\di\ServiceLocator->get()", "#8 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/di/ServiceLocator.php(74): yii\base\Module->get()", "#9 /var/www/html/ng-crm/yiiapp/backend/controllers/UsersController.php(1065): yii\di\ServiceLocator->__get()", "#10 /var/www/html/ng-crm/yiiapp/backend/controllers/UsersController.php(1096): backend\controllers\UsersController->generateJwt()", "#11 [internal function]: backend\controllers\UsersController->actionLogin()", "#12 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()", "#13 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()", "#14 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()", "#15 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction()", "#16 /var/www/html/ng-crm/yiiapp/vendor/yiisoft/yii2/base/Application.php(384): yii\web\Application->handleRequest()", "#17 /var/www/html/ng-crm/yiiapp/backend/web/index.php(25): yii\base\Application->run()", "#18 {main}" ] }

fat2fast commented 5 months ago

@mehad022 Change to new function : getSignerKey() More detail : https://github.com/sizeg/yii2-jwt/blob/v4.0-beta/README.md#creating