New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoConfigure RSAKey, JwtEncoder and JwtDecoder #40138
Comments
Can you provide some more details of what you're looking for? We do already have some code in Perhaps you can provide a sample application with the type of configuration you usually create. |
Hi, I wanted to create a simple application that upon verifies the login credentials submitted via a typical form, and then generate jwt token to the browser. So the jwt token will be sent to backend for every page navigation. No Oauth2 server is involved. In that case, i have to manually write my own JwtDecoder and JwtEncoder. That is why i raise this issue is to hope to a JwtDecoder and JwtEncoder bean can be auto-created for us during application boot up From the source code of OAuth2ResourceServerJwtConfiguration, it seems that spring boot able to automatically create a JwtDecoder bean for us. But sadly no JwtEncoder bean. |
We're discussing this again today and we wondered if you could provide a sample application that shows how you are currently configuring your beans. We want to make sure that we understand the use-case and that it will be broadly applicable. |
Hi, Generate RSA Key Pair
Create JwtEncoder
Generate token
|
Thanks for the additional information. I'm not sure this pattern is generally applicable and something that will suit every application. As such, I don't think we'll be able to provide any auto-configuration ourselves for this. If you're finding this pattern common in your own applications you could extract the code to your own auto-configuration module to make it easier to apply. Thanks anyway for the suggestion. |
Hi,
In the context of spring security, is it possible for spring boot to autoconfigure bean for RSAKey (default to RSA, 2048), JwtEncoder (default to using RSAKey) and JwtDecoder (default to using RSAKey).
This can really help to save time for the developer, instead of developer having to write these beans again and again. Any overriding of default configuration can be done via configuration files
The text was updated successfully, but these errors were encountered: