# hm-security-rbac
**Repository Path**: upy/hm-security-rbac
## Basic Information
- **Project Name**: hm-security-rbac
- **Description**: 黑马oauth2.0 权限管理专题学习记录
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 1
- **Created**: 2020-07-27
- **Last Updated**: 2021-08-04
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
**黑马 Oauth2.0 权限管理专题**
>**1-授权码模式**
发送get请求:
http://localhost:8080/uaa/oauth/authorize?client_id=c1&response_type=code&scope=all&redirect_uri=http://www.baidu.com
拿到授权码
https://www.baidu.com/?code=5xXabd
发送post请求:
http://localhost:8080/uaa/oauth/token?client_id=c1&client_secret=secret&grant_type=authorization_code&code=rjLxYm&redirect_uri=http://www.baidu.com
>**2-简化模式**
发送get请求:
http://localhost:8080/uaa/oauth/authorize?client_id=c1&response_type=token&scope=all&redirect_uri=http://www.baidu.com
返回
https://www.baidu.com/#access_token=797dd6ce-46cf-4816-b764-13357b2efd6f&token_type=bearer&expires_in=7114
>**3-密码模式**
发送post请求:
http://localhost:8080/uaa/oauth/token?client_id=c1&client_secret=secret&grant_type=password&username=admin&password=123
>**4-客户端模式**
发送post请求:
http://localhost:8080/uaa/oauth/token?client_id=c1&client_secret=secret&grant_type=client_credentials