Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

We should not silently put JWT to ctx.Locals() #58

Open
shytikov opened this issue Sep 10, 2021 · 0 comments
Open

We should not silently put JWT to ctx.Locals() #58

shytikov opened this issue Sep 10, 2021 · 0 comments

Comments

@shytikov
Copy link
Contributor

shytikov commented Sep 10, 2021

Currently on successful validation token is always saved to ctx.Locals(), but I'm not sure it's necessary, as if we can always get this information from the ctx anyway, either headers, or cookies or URL params. What might be valuable is to have claims saved instead.

And in any case, we should not decide, but rather give a developer an option on how to treat this situation – the best would be to update the signature of SuccessHandler and pass a JWT there. And in case if a developer need it – he / she could save information that they need where they want. While today it's even impossible to switch off this behavior.

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