Open Hothi-Jimit opened 4 years ago
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Subject of the issue
Lumen ^7.0 token always return false
Your environment
In my project "laravel/lumen-framework": "^7.0" and "tymon/jwt-auth": "^1.0". When I creating token that time always returns false.
app/User.php
`<?php
namespace App;
use Illuminate\Auth\Authenticatable; use Laravel\Lumen\Auth\Authorizable; use Illuminate\Database\Eloquent\Model; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Support\Facades\Hash; use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Model implements JWTSubject, AuthenticatableContract, AuthorizableContract { use Authenticatable, Authorizable; public $table= "USER_MASTER"; protected $primaryKey = 'USER_ID'; public $incrementing = false; const CREATED_AT = 'CREATED_DATE'; const UPDATED_AT = 'UPDATED_DATE';
}`
app/Http/Controllers/AuthController.php
`<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request; use App\User; use Tymon\JWTAuth\Contracts\Providers\Auth; use Tymon\JWTAuth\Facades\JWTAuth;
class AuthController extends Controller { public function __construct() { //$this->middleware('auth:api', ['except' => ['login']]); }
} `
User insert working perfect but when the same detail hit with postman that return always an error.
Please help me.
Thank you.