Is it possible to use RS256 in JWT ? #12250
Answered
by
wsargent
MihaiBeigar
asked this question in
Q&A
-
I got an ticket from security we should switch to at least RS256 with private / public key pair. So the question is does play framework have support for anything else than HS for JWT ? |
Beta Was this translation helpful? Give feedback.
Answered by
wsargent
Dec 4, 2023
Replies: 1 comment 4 replies
-
You mean like https://github.com/franzgranlund/play-java-jwt or do you want to swap out the session cookie baker? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default session cookie baker is here:
https://github.com/playframework/playframework/blob/main/core/play/src/main/scala/play/api/mvc/Session.scala#L120
and then the CookiesModule binds that:
https://github.com/playframework/playframework/blob/main/core/play/src/main/scala/play/api/mvc/Cookie.scala#L844
So you can override the binding to
SessionCookieBaker
to use something other than the DefaultSessionCookieBaker with your own module and implementation, so like https://www.playframework.com/documentation/2.8.x/SettingsSession#URL-Encoded-Cookie-Encoding only with your own module instead.