i'm actually on symfony4 and php7.2.9 with apache bundle. I'm trying to use lexikJWT bundle. I have tested the request with postman and curl command. The header is send in json (for the json_login function).
What ever i do i get a 404 error.
The configuration from the doc seem to be simple so i don't understand what i'm doing wrong/api/test is workingI have also noticed that the /api send me to the root directory
security.yaml
providers: # used to reload user from session & other features (e.g. switch_user) app_user_provider: entity: class: App\Entity\User property: email firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false login_check: pattern: ^/api/login stateless: true anonymous: true json_login: check_path: /api/login_check success_handler: lexik_jwt_authentication.handler.authentication_success failure_handler: lexik_jwt_authentication.handler.authentication_failure api: pattern: ^/api stateless: true guard: authenticators: - lexik_jwt_authentication.jwt_token_authenticator
routes.yaml
api_login_check: path: /api/login_check
php bin/console debug:router login_check
:
+--------------+---------------------------------------------------------+| Property | Value |+--------------+---------------------------------------------------------+| Route Name | login_check || Path | /api/login_check || Path Regex | #^/api/login_check$#sD || Host | ANY || Host Regex | || Scheme | ANY || Method | POST || Requirements | NO CUSTOM || Class | Symfony\Component\Routing\Route || Defaults | NONE || Options | compiler_class: Symfony\Component\Routing\RouteCompiler |+--------------+---------------------------------------------------------+````php bin/console router:match /api/login_check`: [OK] Route "api_login" matches+--------------+-----------------------------------------------------------+| Property | Value |+--------------+-----------------------------------------------------------+| Route Name | api_login || Path | /api/login_check || Path Regex | #^/api/login_check$#sD || Host | ANY || Host Regex | || Scheme | ANY || Method | ANY || Requirements | NO CUSTOM || Class | Symfony\Component\Routing\Route || Defaults | _controller: App\Controller\SecurityController::api_login || Options | compiler_class: Symfony\Component\Routing\RouteCompiler |+--------------+-----------------------------------------------------------+
If you have any advice i will take it !Thx in advance