Can I do this
- Have one (hosted on mydomain/public) laravel Api with the purpose of authenticating the user and getting a JWT token. i.e
authentication server
- Somehow passing this same Token to a second (hosted on mydomain/secure) laravel Api in order to authenticate the user and the access the App. i.e
resource server
I have tried to do that using the this package. As I asked above I have done authentication on authentication server
as described here and token had been generated and I had added some data to the token that is required in resource server. And I passed that token to the resource server
and try to parse the token I get the error like Token has expired
So , my question is :
- How can I do verification of JWT signature's at resource-server side?
- Is it possible to do using JWT?
Code I had tried to parse the token in resource server
Route::get("/parse/token",function(Request $request){
$token = JWTAuth::getToken();
$user = JWTAuth::toUser($token);
return $user ;
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire