Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

JWT subject parsing is buggy in TSec - Http4s #322

Open
cdelmas opened this issue Oct 15, 2020 · 0 comments
Open

JWT subject parsing is buggy in TSec - Http4s #322

cdelmas opened this issue Oct 15, 2020 · 0 comments

Comments

@cdelmas
Copy link

cdelmas commented Oct 15, 2020

When using TSec / Http4s, it looks like parsing the JWT subject is buggy when the type is String. The requests then all fail with an Unauthorized error.

I can reproduce this behaviour with a sample application here: https://github.com/cdelmas/tsec-http4s-case-1 (instructions to reproduce in the README).

TL;DR; the jwt subject should contain an opening double quote (and probably a closing one) to be parsed as a string (the id type I have chosen) by the json parser (jawn), as far as I understand. A decent workaround would be to use an Int, but I prefer using a String.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant