Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWTAuth: Manual test on wrong structure #2043

Open
ndhalvad opened this issue Oct 9, 2020 · 1 comment
Open

JWTAuth: Manual test on wrong structure #2043

ndhalvad opened this issue Oct 9, 2020 · 1 comment
Labels

Comments

@ndhalvad
Copy link

ndhalvad commented Oct 9, 2020

Subject of the issue

Testing Case:
Use inserted wrong structured token test(Created using correct secret)
Actual Structure of token is: 'eyJ0eXAiOiJKV1Qi...'
Testing with wrong structure: 'yJ0eXAiOiJKV1Qi...'

Testing Code[Middleware]: if (!JWTAuth::decode($token)) {}

Getting Error: Tymon\JWTAuth\Exceptions\TokenInvalidException: Could not decode token: Error while decoding to JSON: Syntax error in file /var/www/html/*****/vendor/tymon/jwt-auth/src/Providers/JWT/Lcobucci.php on line 133

Testing environment

| Framework | Laravel / Lumen
| Framework version | 7.x

Expected behaviour

Should respond the actual error message rather to tell issue at line.....etc

Actual behaviour

Tymon\JWTAuth\Exceptions\TokenInvalidException: Could not decode token: Error while decoding to JSON: Syntax error in file /var/www/html/*****/vendor/tymon/jwt-auth/src/Providers/JWT/Lcobucci.php on line 133

Is this something missing OR can handle the same with another option?

@stale
Copy link

stale bot commented Dec 25, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant