Questions tagged [lexikjwtauthbundle]

The LexikJWTAuthenticationBundle provides authentication via Json Web Token for Symfony2+ REST API .

167 questions
17
votes
7 answers

Symfony4: Unable to find the controller for path "/api/login_check". The route is wrongly configured

I am tyring to set up symfony4 api JSON login by JWT. The api platform core bundle is installed and I followed this instruction: https://api-platform.com/docs/core/jwt/ I created the custom user provider as described. By opening the URL…
user3684098
  • 269
  • 2
  • 18
11
votes
2 answers

Error: Unable to find the controller for path "/login_check". The route is wrongly configured. (LexikJWTAuthentication)

Description When I'm doing a normal request to my symfony server running on http://localhost:8000/api/admin/login_check it returns the desired jwt token. However, when I do it with the functional tests (with ./bin/phpunit) I get the following…
kemicofa ghost
  • 14,587
  • 5
  • 63
  • 112
9
votes
2 answers

Symfony PHPUnit - Inject dependency

I want to test this TokenProvider
Kevin
  • 3,762
  • 4
  • 26
  • 55
8
votes
2 answers

API Platform - Swagger UI with JWT Authentication

I'd like to add the "Authorize" button on Swagger, like described here : https://api-platform.com/docs/core/jwt#documenting-the-authentication-mechanism-with-swaggeropen-api I installed LexikJWTAuthenticationBundle, it works fine with Curl. But when…
user9384432
  • 81
  • 1
  • 3
7
votes
2 answers

LexikJWTAuthenticationBundle - There is no extension able to load the configuration for "api_login_check"

I'm trying to make some experiments with JWT and PHP, but I cannot make the LexikJWTAuthenticationBundle work. I created a Symfony project using composer composer create-project symfony/skeleton my_project and install LexikJWTAuthenticationBundle…
6
votes
1 answer

Using HWIOAuthBundle and LexikJWT at the same time

As the title suggests, I'm going to use Facebook,Google and GitHub authentication alongside JWT authenticator (LexikJWT). Before starting, I want to know how can I use them? is it possible to use both of them to protect APIs? If yes, what sort of…
6
votes
1 answer

Symfony 2 FOSUserBundle with rest login and registration

I have gone through lots of stackoveflow question and articles, but can't find a suitable answer. I'm using fosuserbundle, hwiouthbundle and lexikjwt bundle. I'm developing an api based on symfony which will be consumed by an android app and angular…
Ahmad Sajid
  • 103
  • 1
  • 8
6
votes
3 answers

Lexik JWT returns 401 Unauthorized

I am using LexikJWTBundle for a RESTful API. Login works just fine and I get my token. But when I make a GET request I get a 401 with no content. The Authorization header seems ok since I get this in the profiler: Request Headers: authorization:…
Xavier13
  • 761
  • 7
  • 16
5
votes
10 answers

401 JWT Token not found

I provided two versions of the security.yaml file. The second version according to API Platform documentation. API Platform sends to the creation a custom user provider. For the second option security.yaml recommended at API Platform docs, I need to…
Dmitry S.
  • 1,820
  • 2
  • 11
  • 24
5
votes
2 answers

How to implement custom user provider for Lexik JWT authentication?

I try to implement LexikJWT authentication to my symfony/mongodb project, I succeeded to authenticate through a static users (in_memory), but I have no idea how to exploit it with my own user class, here's my code-lines: Security.yml security: …
5
votes
2 answers

Deploy Symfony app with LexikJWTAuthenticationBundle on Heroku

I have my app deployed to Heroku, then I added an api with LexikJWTAuthenticationBundle for authentication. I created public and private keys with a passphrase like the documentation says, and it works great on my local machine, yet I do not know…
5
votes
3 answers

Lexik JWT Token not found

I've seen similar questions but still can't get this to work. I'm new with Symfony and I'm using Lexik JWT bundle with symfony3 for API authentication, and a login form for web authentication. I get the token ok but when I try to use it I get 401 -…
NaryaV
  • 88
  • 1
  • 6
5
votes
1 answer

JWT authentification with Symfony 2.7

I'm trying to use LexikJWTAuthenticationBundle with FOSUserBundle on my Symfony 2.7 application. Basically, the FOSUserBundle config works fine: I properly load my fixtures and if I try to login via the login form it succeeds. Getting the token from…
Théo
  • 635
  • 7
  • 17
4
votes
1 answer

Symfony 4: Test DB for JWT and Behat

I am using API Platform 2.1 with Symfony 4 and I am using the LexikJWTAuthenticationBundle for authentication, and Behat for testing. I am unable to set things up properly. Here is my configuration so far: Feature: Books feature @createSchema…
apfz
  • 310
  • 3
  • 21
  • 52
4
votes
2 answers

Symfony JWT token: exception when token is expired

I am using JWT Token Bundle for user authentication. When the token is expired I get 500 server error. Instead of this how can I return JsonResponse with error code and message? Here is my authenticator class: class JwtTokenAuthentication extends…
blahblah
  • 920
  • 11
  • 36
1
2 3
11 12