PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 23, 2022

[FIXED] Lexik JWT, how to allow only user's infrmations

 January 23, 2022     lexikjwtauthbundle, symfony     No comments   

Issue

I wonder how can I configure JWT Lexik to authorize the user who is connected to have access only to his informations, and not all informations of all API like it's the case for me now. My JWT is functional

thanks

Laurie


Solution

First, you will have to understand the concept of the Symfony Security Component. The job of this component is to manage everything related to the security in your application : Such as authentication, permissions, roles, etc.

More information: https://symfony.com/doc/current/components/security.html

The job of Lexik JWT is to provide an auth system with JWT tokens.

It is not the job of LexikJWT to do that, but the job of the security component.

More information about how to restrict access: https://symfony.com/doc/current/security.html#denying-access-roles-and-other-authorization



Answered By - Martin Paucot
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing