spring-oauth-server
Deep Integrate Spring Security & OAuth2
base on Spring-Boot
spring-oauth-server is based on spring-security-oauth2, but we do more useful extension as follow
Split Spring MVC configuration and OAuth configuration
Save Spring Security User data to database
Save ClientDetails to database, and manage it
Extend ClientDetails fields, add
trusted
field for check the client is trust or notCancel unnecessary configuration
Different resources config different roles
access_token, code save to database(replace save to memory)
Add Restful OAuth API, see
OAuthRestController
Dependency Framework, version
- JDK (1.8.0_40)
- Servlet API (3.1.0)
- Spring Boot(2.0.1.RELEASE)
- spring-security-oauth2 (2.3.0.RELEASE)
How to use
Download or clone the project source code to local computer, make sure the computer install JAVA development environment(JDK,Maven,Tomcat,IDE...)
Create MySql(5.0+) Database: oauth2_boot, run SQL script files(position: /others/database), run script order: initial_db.ddl -> oauth.ddl -> initial_data.ddl.
Config
application.properties
(position: src/main/resources), update database connection information(username, password).Use Maven import local project to IDE(for example: Intellij IDEA), Add Servlet-Container-Server(Tomcat), startup the server(make sure set project contextPath = 'spring-oauth-server').
Besides, use maven commandmvn package
compile the project(generate 'spring-oauth-server.war'), copy the war to Tomcat(make sure add 'application.properties' to classpath) and startup.Visit oauth_test.txt (position: others) and testing step by step(Browser default URL: http://localhost:8080/spring-oauth-server).
Database table,column explain
db_table_description.html(position: /others) is explain the SQL file oauth.ddl
all tables, columns,
tell how to use and where use.
Online visit address
http://andaily.com/spring-oauth-server/db_table_description.html(Chinese).
More...
Project Blog address: http://andaily.com/blog/?cat=19(Chinese)
More my open-source projects: http://andaily.com/my_projects.html
More help please contact: [email protected]
项目中文GIT库地址: https://gitee.com/shengzhao/spring-oauth-server
Spring Security OAuth2 开发指南[中文] https://www.oschina.net/translate/spring-security-oauth-docs-oauth2
Expect your joining...