r/learnjava • u/matlau_286 • Jul 25 '20
Java Spring App Boilerplate - JWT Auth, PostgreSQL, deploy to AWS
Hi community!
Inspired by this YouTube tutorial by AmigosCode and as a follow-up to my previous Java Spring Security boilerplate project here, I have put together another Java Spring reference boilerplate, which has the following features:
JWT User authentications
Persistent data with PostgreSQL database
Deploy to Production onto AWS Elastic Beanstalk and AWS RDS database
The app has plenty of to-do's such as:
Adding other HTTP methods such as
DELETE,PATCHConnect
UserServicewith the PostgreSQL databaseBuild a front-end React client (currently a react app is in the
src/clientdirectory)
Please feel free to take a look, thank you!
Github project link: https://github.com/MatthewCYLau/java-spring-skills-tracker
1
u/Italsr Jul 26 '20
learning more about spring security and jwt this helps a lot! I just have one question, at what point do you assign roles and permissions to a user? If I understand correctly, every new user would have all these fields?
private final String username;private final String password;private final Set<? extends GrantedAuthority> grantedAuthorities;private final boolean isAccountNonExpired;private final boolean isAccountNonLocked;private final boolean isCredentialsNonExpired;private final boolean isEnabled;