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

Bug: Bearer prefix on auth header (JWT Authenticator) #1038

Closed
MrFrost-Nv27 opened this issue Feb 22, 2024 · 4 comments · Fixed by #1040
Closed

Bug: Bearer prefix on auth header (JWT Authenticator) #1038

MrFrost-Nv27 opened this issue Feb 22, 2024 · 4 comments · Fixed by #1040
Labels
bug Something isn't working

Comments

@MrFrost-Nv27
Copy link
Contributor

MrFrost-Nv27 commented Feb 22, 2024

PHP Version

8.2.1

CodeIgniter4 Version

4.2.5

Shield Version

1.0.1

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MySQL

Did you customize Shield?

Yes, on JWT Authenticator is not same as JWT Filter on grab the token, JWT Filter was done with bearer prefix but in JWT Authenticator wasn't, please see my change below
Screenshot 2024-02-22 110240

What happened?

error malformed loggedIn method on JWT Authenticator because the method for grab the token isn't fixed with bearer prefix
Screenshot 2024-02-22 110456

Steps to Reproduce

add getTokenFromHeader method like JWT Filter in JWT Authenticator

Expected Output

easyly doing prefix or not on loggedin method with JWT Authenticator

Anything else?

nothing, just see my opinion and do update if it good

@MrFrost-Nv27 MrFrost-Nv27 added the bug Something isn't working label Feb 22, 2024
@kenjis
Copy link
Member

kenjis commented Feb 22, 2024

Thank you for reporting.
I can't see the changes in the screenshot, can you send a Pull Request?

@MrFrost-Nv27
Copy link
Contributor Author

okay, this my pull request #1039

@kenjis
Copy link
Member

kenjis commented Feb 22, 2024

Thank you for the PR!
I refactored it a bit. See #1040
If it is okay, please approve it.

@kenjis kenjis reopened this Feb 22, 2024
@MrFrost-Nv27
Copy link
Contributor Author

Thank you for the PR! I refactored it a bit. See #1040 If it is okay, please approve it.

Yes that good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants