Skip to content

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

@MrFrost-Nv27

Description

@MrFrost-Nv27

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions