# spring_security_oauth2 **Repository Path**: radarwin/spring_security_oauth2 ## Basic Information - **Project Name**: spring_security_oauth2 - **Description**: spring_security_oauth2应用于登录、授权校验 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-07-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # spring_security_oauth2 #### 项目介绍 spring_security_oauth2应用于登录、授权校验 #### 安装教程 1. 创建数据库auth 2. 执行data目录的sql文件 3. 启动 Application.java 文件 #### 客户端与用户的账户密码 admin $2a$10$vg5QNHhCknAqevx9vM2s5esllJEzF/pa8VZXtFYHhhOhUcCw/GWyS
对应的明文:admin 123456 #### 使用说明 1. 获取access_token : ```http://localhost:8989/oauth/token?username=admin&password=123456&grant_type=password&scope=server&client_id=admin&client_secret=123456``` 2. 请求被校验的order资源:```http://localhost:8989/order/2?access_token=efd2699f-ca87-45d3-b70e-b170bb4e2bf5``` 3. 请求被过滤的product资源:```http://localhost:8989/product/2``` 4. 根据refresh_token获取新的access_token :```http://localhost:8989/oauth/token?grant_type=refresh_token&refresh_token=bd711a45-8d2e-47db-a3c2-2e8d0c6a7a7e&client_id=admin&client_secret=123456``` #### 参与贡献 1. Fork 本项目 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request