Category : authentication

I’m using Symfony (5) with NelmioApiDocBundle (4.0) and LexikJWTAuthenticationBundle to create an API with Swagger. I’ve set up endpoints and authentication and everything is working as expected. I have fully functional API with authentication, there is a documentation and I can successfully generate Open API spec. There is one thing missing in specification: "Authentication endpoint" ..

Read more

I want to login through an API, based on my entity AppEntityUser. Here is the security.yaml file: security: encoders: AppEntityUser: algorithm: bcrypt providers: app_user_provider: entity: class: AppEntityUser property: username firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: pattern: ^/ anonymous: ~ provider: app_user_provider json_login: login_path: app_login check_path: app_login username_path: username password_path: password access_control: – { path: ..

Read more

In an attempt to refactor entities from Class Table Inheritance to separate user type classes I’ve run into this: The "AppSecurityLoginFormAuthenticator::getUser()" method must return a UserInterface. You returned "array". From the docs I configured a chain of user providers. I’m at a loss. For a custom user provider I’ve found Symfony’s ChainUserProvider but integrating it ..

Read more