Closed 418Coffee closed 1 year ago
Hello,
I'm trying to do something similar to #103, extract a JWT from a custom header field.
{ "X-Auth": "eyJ....." }
I believe currently, it's impossible to achieve this, because an empty AuthScheme value gets interpreted as default and set to "Bearer":
AuthScheme
if cfg.AuthScheme == "" { cfg.AuthScheme = "Bearer" }
Perhaps we can default AuthScheme to "Bearer" if AuthScheme == "" && TokenLookup == defaultTokenLookup. Please let me know what you think about this. I would be happy to make a PR.
AuthScheme == "" && TokenLookup == defaultTokenLookup
@418Coffee Send a PR, as long as it's backwards compatible should be fine. :-)
Hello,
I'm trying to do something similar to #103, extract a JWT from a custom header field.
I believe currently, it's impossible to achieve this, because an empty
AuthScheme
value gets interpreted as default and set to "Bearer":Perhaps we can default
AuthScheme
to "Bearer" ifAuthScheme == "" && TokenLookup == defaultTokenLookup
. Please let me know what you think about this. I would be happy to make a PR.