项目作者: melardev
项目描述 :
Java Spring Boot Crud application secured with OAuth2 Jwt
高级语言: Java
项目地址: git://github.com/melardev/JavaSpringBootOAuth2AsymmetricJwt_Separate_Crud.git
Table of Contents
Introduction
An API sample showing how to create a basic Rest API and implement the CRUD operations with Pagination
using Spring Security OAuth2 with JWT. First you have to obtain a JWT, you can go either to /oauth/token
or to /auth/login, providing client_username:client_password form for http basic authentication as well as post body with username and
password.
Example: POST client1:password@localhost:8081/auth/login
With client1:password as the client credentials. And {“username”: “admin”: “password”:”password”} in the post Body.
For more details and other examples look at the postman_collection.json file attached with this repo
About Key pair
This project uses Asymmetric cryptography.
- To create the private key used to sign the keys by the oauth-server I did:
keytool -genkeypair -alias melardev -keyalg RSA -keysize 2048 -keystore private.jks -validity 3650
- export public key from jks, this will be used by resource-server to validate tokens without having to contact the oauth-server
keytool -list -rfc --keystore private.jks | openssl x509 -inform pem -pubkey -noout -keyout public.pem
What you will learn:
- Spring Boot
- Spring Data
- Spring Security
- Spring Security OAuth2 + JWT
- Hql
- Pagination
- Sorting
- Full CRUD
- Customizing Jackson JSON responses and strategies.
- H2 integration
- Seeding data with Faker
- Organizing applications
Full-stack Applications
Simple Crud
Server side implementations
Microservices
Client side implementations
The next come are
- Angular NgRx-Store
- Angular + Material
- React + Material
- React + Redux + Material
- Vue + Material
- Vue + Vuex + Material
- Ember
- Vanilla javascript
Server side implementations
MicroServices
The next come are
- NodeJs Express + Knex
- Flask + Flask-Restful
- Laravel + Fractal
- Laravel + ApiResources
- Go with Mux
- AspNet Web Api 2
- Jersey
- Elixir
Client side implementations
The next come are
- Angular NgRx-Store
- Angular + Material
- React + Material
- React + Redux + Material
- Vue + Material
- Vue + Vuex + Material
- Ember
- Vanilla javascript
Auth Jwt + Crud
Server side implementations
Server side implementations
Client side implementations
E-commerce
Server side implementations
The next to come are:
- Spring Boot + Spring Data Hibernate + Kotlin
- Spring Boot + Jax-RS Jersey + Hibernate + Kotlin
- Spring Boot + mybatis
- Spring Boot + mybatis + Kotlin
- Asp.Net Web Api v2
- Elixir
- Golang + Beego
- Golang + Iris
- Golang + Echo
- Golang + Mux
- Golang + Revel
- Golang + Kit
- Flask + Flask-Restful
- AspNetCore + NHibernate
- AspNetCore + Dapper
Client side implementations
This client side E-commerce application is also implemented using other client side technologies:
Blog/CMS
Server side implementations
Client side
The next come are
- Angular NgRx-Store
- Angular + Material
- React + Material
- React + Redux + Material
- Vue + Material
- Vue + Vuex + Material
- Ember
- Youtube Channel I publish videos mainly on programming
- Blog Sometimes I publish the source code there before Github
- @melardev">Twitter I share tips on programming
- Instagram I share from time to time nice banners