Jwt-auth: Get token not giving token

Created on 18 Jul 2017  路  6Comments  路  Source: tymondesigns/jwt-auth

hello, I'm trying to get JWT token from headers using JWTAuth::getToken() and this is what i get "authorization": {}, and while dd(JWTAuth::getToken()), it gives response as

Token {#360
  -value: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9hcGkvdjEvbG9naW4iLCJpYXQiOjE1MDAzNjMzNzgsImV4cCI6MTUwMDY2MzM3OCwibmJmIjoxNTAwMzYzMzc4LCJqdGkiOiI0bmkyVmg5RWt1TWtWNnhkIn0.OORKHBnIareDr2Z48pkXN-V3ykUEQRfpfNx5RnQkVI4"
}

Is there any way to access the above token or get token value

Most helpful comment

Instead, you can use JWTAuth::getToken()->get()

All 6 comments

Yes, my guess is there is a different bug in your code. Can you add more code where this is happening?

I'm sorry didn't reply then. I already fixed it by doing (string)JWTAuth::getToken() which successfully gives me my required Authorization Code

Instead, you can use JWTAuth::getToken()->get()

@tijanmdr Man you are a savior .. you have no idea

@eranshmil thanks man it worked

Thanks man it works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CBR09 picture CBR09  路  3Comments

agneshoving picture agneshoving  路  3Comments

lbottoni picture lbottoni  路  3Comments

gamelife1314 picture gamelife1314  路  3Comments

phamduong picture phamduong  路  3Comments