Skip to content

Commit

Permalink
1. 文档改进
Browse files Browse the repository at this point in the history
  • Loading branch information
eacdy authored and limu.zl committed May 6, 2019
1 parent eb6a2e7 commit 8173f14
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
24 changes: 21 additions & 3 deletions light-security-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GET http://localhost:8009/login



### 第二步:验证基于 `application.yml` 的权限控制
### 第二步:验证基于 `application.yml` 的权限控制[可入]

```shell
# 请求/user端点,该端点需要具备admin/user角色之一才能访问
Expand All @@ -21,7 +21,16 @@ Authorization:Bearer 你的token



### 第三步:验证基于注解的权限控制
### 第三步:验证基于 `application.yml` 的权限控制[无权]
```shell
# 请求/user-no-access端点,该端点需同时具备admin/user/xx角色之一才能访问,故而当前用户无法访问该端点
GET http://localhost:8009/user-no-access
Authorization:Bearer 你的token
```



### 第四步:验证基于注解的权限控制[可入]

```shell
# 请求/annotation-test端点,该端点必须同时具备admin以及user端点才能访问
Expand All @@ -31,6 +40,15 @@ Authorization:Bearer 你的token



### 第五步:验证基于注解的权限控制[无权]
```shell
# 请求/annotation-test-no-access端点,该端点必须同时具备admin、user、xx角色才能访问,故而当前用户无法访问该端点
GET http://localhost:8009/annotation-test-no-access
Authorization:Bearer 你的token
```



## IntelliJ IDEA懒人玩法

用IDEA打开 `IDEA HTTP Client测试脚本.http`依次执行第一步、第二步、第三步即可
用IDEA打开 `IDEA HTTP Client测试脚本.http`依次执行即可
24 changes: 21 additions & 3 deletions light-security-webflux-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GET http://localhost:8009/login



### 第二步:验证基于 `application.yml` 的权限控制
### 第二步:验证基于 `application.yml` 的权限控制[可入]

```shell
# 请求/user端点,该端点需要具备admin/user角色之一才能访问
Expand All @@ -21,7 +21,16 @@ Authorization:Bearer 你的token



### 第三步:验证基于注解的权限控制
### 第三步:验证基于 `application.yml` 的权限控制[无权]
```shell
# 请求/user-no-access端点,该端点需同时具备admin/user/xx角色之一才能访问,故而当前用户无法访问该端点
GET http://localhost:8009/user-no-access
Authorization:Bearer 你的token
```



### 第四步:验证基于注解的权限控制[可入]

```shell
# 请求/annotation-test端点,该端点必须同时具备admin以及user端点才能访问
Expand All @@ -31,6 +40,15 @@ Authorization:Bearer 你的token



### 第五步:验证基于注解的权限控制[无权]
```shell
# 请求/annotation-test-no-access端点,该端点必须同时具备admin、user、xx角色才能访问,故而当前用户无法访问该端点
GET http://localhost:8009/annotation-test-no-access
Authorization:Bearer 你的token
```



## IntelliJ IDEA懒人玩法

用IDEA打开 `IDEA HTTP Client测试脚本.http`依次执行第一步、第二步、第三步即可
用IDEA打开 `IDEA HTTP Client测试脚本.http`依次执行即可

0 comments on commit 8173f14

Please sign in to comment.