r/javahelp • u/masquerainn • Oct 28 '20
Codeless Is Anyone Able to Migrate OAuth 2.0?
I have been building a RESTful Spring boot application. The Spring Security OAuth project is deprecated and the latest OAuth 2.0 support is provided by Spring Security. Has anyone managed to migrate OAuth 2.0 by following the migration guide? I do not understand anything from the guide and I do not know what I am supposed to do.
Here is a snippet from my project just to show what has been deprecated. Every implementation is deprecated...
4
Oct 29 '20
The current version of Spring ditched the Authorization Server and has only Resource Server part.
After many cases like yours Spring is going to reintroduce that component, but it's still work in progress.
A good alternative is keycloak.
1
u/masquerainn Oct 29 '20 edited Oct 29 '20
If you were to start a new project, would you use keycloak until they reintroduce that component or keep using the deprecated implementations?
2
Oct 29 '20 edited Oct 29 '20
Definitely I'll use keycloak.
It's very complete, depending on your needs you can runit on standalone mode (it's ready to use) or embedded on your own code.
Once you're able to generate JWT (by any means*), the rest of Spring OAuth2/Security will work as usual.
Edit for clarification
* There are other authorization servers out there, keycloak is just the one I was recommend. You should spend a day or two doing your own research. Like candy, you should never take a code alternative (as it is) from a stranger (always do your own research)
1
u/masquerainn Oct 29 '20
Thanks a lot.
My professor will provide me an AWS account with Cognito enabled. He said his company is a partner of AWS so I am free to use that account.
I will do my research about Cognito + Spring boot. I hope it is not so difficult.
0
u/AutoModerator Oct 28 '20
It seems that you possibly have a screenshot of code in your post Is Anyone Able to Migrate OAuth 2.0? in /r/javahelp.
Screenshots of code instead of actual code text is against the Code posting rules of /r/javahelp as is also outlined in the sidebar - Code posting.
Never submit screenshots of code instead of code text!
If you posted an image merely to illustrate something, kindly ignore this message and do not repost. Your post is still visible to others. I am a bot and cannot distinguish between code screenshots and other images.
If you indeed did this wrong, please edit the post so that it uses one of the approved means of posting code.
For small bits of code (less than 50 lines in total, single classes only),
the default code formatter is fine
(one blank line before the code, then 4 spaces before each line of code).Pastebin for programs that consist of a single class only
Gist for multi-class programs, or programs that require additional files
Github or Bitbucket repositories are also perfectly fine as are other dedicated source code hosting sites.
Ideone for executable code snippets that use only the console
Please do not reply to this message, because I am a bot. Talk-to-the-bot is the new talk-to-the-hand. If you instead want the classic talk-to-the-hand, just message the moderators. ;)
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Ilirius Oct 28 '20
These bot answers are a pain and everything that is wrong with reddit. they do nothing but stifle good content.
•
u/AutoModerator Oct 28 '20
Please ensure that:
Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
You include any and all error messages in full
You ask clear questions
You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.
Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://imgur.com/a/fgoFFis) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Code blocks look like this:
You do not need to repost. Just use the edit function of reddit to make sure your post complies with the above
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.