This repository has been archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Allow Header Extraction without AuthScheme #103
Comments
JEreth
added a commit
to JEreth/jwt
that referenced
this issue
Oct 26, 2022
When we have an empty AuthScheme we accidently crop the first character as it usually has a space. This PR suggest to trim the token instead of cropping with + 1
Sorry 😅 |
I added a PR: #104 |
solved with #104 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We used Fiber in a use case where we get a JWT token in a custom header field from an auth platform like this
It seems like can not extract this structure via the fiber JWT middleware as it expects a auth scheme and if not given it crops the first character of the key as it expecs
<AuthScheme> <Token>
.See:
jwt/jwt.go
Line 39 in 1a9806c
Suggestion: Either we check if AuthScheme is empty or we trim the token and do not crop with
+1
The text was updated successfully, but these errors were encountered: