breakfix: keystore: failed to parse token
with JWT shared secret
#277
Labels
keystore: failed to parse token
with JWT shared secret
#277
Describe the issue
I'm having trouble getting JWT shared secret authorization to work. I'm repeatedly getting this error:
I get the same error regardless of whether I use a 32-byte secret or the default 16-byte secret from: https://authp.github.io/docs/authorize/token-verification. I would like to be using a 32-byte secret and the HS256 algorithm. I'm probably missing something very basic.
Configuration
Version Information
Expected behavior
I would expect that using this script, I would be able to get a 200 response:
It depends on jwt-cli. With
~/example.jwt
containing383aca9a-1c39-4d7a-b4d8-67ba4718dd3f
in plain text, I invoke it as./test.sh ~/example.jwt https://site.com/auth
:I've checked that this example JWT verifies against the secret on
jwt.io
.However, Caddy logs:
Additional context
Things I've tried:
Authorization: (Bearer) $JWT
andvalidate bearer header
. When I mismatch the request header with the config I getreason: no token found
in Caddy's logs, which suggests that token discovery is working when the header matches the config.?access_token=$JWT
. It gets picked up but the error is the same./auth
vs/eleel
).request>headers>Authorization delete
directive which deletes the Auth header from the logs.The text was updated successfully, but these errors were encountered: