corbosman / laravel-passport-claims

Add claims to Laravel Passport JWT Tokens
MIT License
82 stars 11 forks source link

Accessing Claims #4

Closed mediavariance closed 4 years ago

mediavariance commented 4 years ago

@corbosman thanks for the package. How can we access the claims once they've been set?

corbosman commented 4 years ago

That depends on how you use these JWTs. Any JWT library should be able to read them. If you want to access the claims in a laravel app, id have to know how/where you want to use them. Since I dont access the claims in a laravel app I haven't really had the need to look into this. But if I needed to get the claims I'd probably use https://github.com/lcobucci/jwt, which passport also uses.