Skip to content

Commit 959a887

Browse files
committed
Update README.md
1 parent 9103d30 commit 959a887

File tree

11 files changed

+111
-93
lines changed

11 files changed

+111
-93
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ Server.
1818

1919
- [Using JWT with Spring Security OAuth2](https://relive27.github.io/blog/spring-security-oauth2-jwt)
2020
- [Custom OAuth2 Authorization Consent Page](https://relive27.github.io/blog/custom-oauth2-consent-page)
21-
- [Spring Security persistent OAuth2 client](https://relive27.github.io/blog/persisrence-oauth2-client)
21+
- [Spring Security Persistent OAuth2 Client](https://relive27.github.io/blog/persisrence-oauth2-client)
2222
- [Spring Security OAuth2 Client Credentials Authorization](https://relive27.github.io/blog/oauth2-client-model)
23-
- [Spring Security OAuth2 Authorization Code Flow with Proof Key for Code Exchange (PKCE)](https://relive27.github.io/blog/oauth2-pkce)
23+
- [Authorization Code Flow with Proof Key for Code Exchange (PKCE)](https://relive27.github.io/blog/oauth2-pkce)
2424
- [Spring Security OAuth2 Login](https://relive27.github.io/blog/oauth2-login)
2525
- [Spring Security and OpenID Connect](https://relive27.github.io/blog/springn-security-oidc)
2626
- [Spring Cloud Gateway Combined with the Security Practice of OAuth2.0 Protocol](https://relive27.github.io/blog/spring-gateway-oauth2)
2727
- [Spring Security OAuth2 implements simple key rotation and configures resource server JWK cache](https://relive27.github.io/blog/jwk-cache-and-rotate-key)
2828
- [Using Spring Security OAuth2 Authorization Service JWK with Consul Configuration Center](https://relive27.github.io/blog/oauth2-jwk-consul-config)
2929
- [A Simple Guide to Using Spring Security OAuth2 Opaque Tokens](https://relive27.github.io/blog/oauth2-opaque-token)
3030
- [Spring Security OAuth2 Introspection Protocol in conjunction with JWT Guide](https://relive27.github.io/blog/oauth2-introspection-with-jwt)
31-
- [Spring Security OAuth 2.0 authorization server combined with Redis implements access to accessToken rate limits](https://relive27.github.io/blog/oauth2-token-access-restrictions)
31+
- [Spring Security OAuth 2.0 Authorization Server Combined with Redis implements Access to AccessToken Rate Limits](https://relive27.github.io/blog/oauth2-token-access-restrictions)
3232
- [(Coming soon)OAuth2.0 Security Practices for Single Page Applications (SPA)]()
3333
- ...
3434

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
### 相关信息:
1+
## Relevant Information:
22

3-
在该模块中我们使用 Spring Authorization Server 创建了一个 OAuth2.0
4-
授权服务器,当我们在浏览器中测试访问 [http://localhost:8080/oauth2/authorize?response_type=code&client_id=relive-client&scope=message.write%20message.read%20profile&state=some-state&redirect_uri=http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code](http://localhost:8080/oauth2/authorize?response_type=code&client_id=relive-client&scope=message.write%20message.read%20profile&state=some-state&redirect_uri=http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code)
5-
, 在输入用户名密码(admin/password)通过认证后,我们将看到如下自定义授权页面:<br />
3+
In this module we use Spring Authorization Server to create an OAuth2.0 authorization server, When we test
4+
access [http://localhost:8080/oauth2/authorize?response_type=code&client_id=relive-client&scope=message.write%20message.read%20profile&state=some-state&redirect_uri=http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code](http://localhost:8080/oauth2/authorize?response_type=code&client_id=relive-client&scope=message.write%20message.read%20profile&state=some-state&redirect_uri=http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code)
5+
in the browser After entering the username and password(admin/password) to pass the authentication, we will see the
6+
following custom authorization page: <br />
67

78
![](./image/custom-page.png)
89

9-
### 相关文章:
10+
## Relevant Articles:
1011

11-
- [自定义OAuth2授权同意页面](https://relive27.github.io/blog/custom-oauth2-consent-page)
12+
- [Custom OAuth2 Authorization Consent Page](https://relive27.github.io/blog/custom-oauth2-consent-page)
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
## Relevant Information:
12

2-
### 相关信息:
3-
1.`oauth2-server-introspction-with-jwt`是一个使用*spring-security-oauth2-authorization-server*构建的授权服务器。
3+
1. `oauth2-server-introspction-with-jwt` is an authorization server built with *
4+
spring-security-oauth2-authorization-server*.
5+
2. `oauth2-server-introspction-with-jwt` registered an OAuth2.0 client:
6+
- clientId: relive-client
7+
- clientSecret: relive-client
8+
- redirectUri: http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code
49

5-
2.`oauth2-server-introspction-with-jwt`注册了一个 OAuth2.0 客户端:
6-
- clientId: relive-client
7-
- clientSecret: relive-client
8-
- redirectUri: http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code
910

10-
3.`oauth2-server-introspction-with-jwt`注册了一个用户,用户名密码为:`admin`/`password`
11+
3. `oauth2-server-introspction-with-jwt` has registered a user, the username and password are: `admin`/`password`.
1112

12-
4.`resourceserver-introspection-with-jwt`是一个SpringBoot的资源服务,您可以修改`application.yml`数据库配置以连接您的MySQL数据库。
13+
4. `resourceserver-introspection-with-jwt` is a SpringBoot resource service, you can modify the `application.yml`
14+
database configuration to connect to your MySQL database.
15+
5. `oauth2-client-introspection-with-jwt` is an OAuth2.0 client service.
16+
6. After starting all SpringBoot services, the browser
17+
visits [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test) for testing.
1318

14-
5.`oauth2-client-introspection-with-jwt`是一个 OAuth2.0 客户端服务。
19+
## Relevant Articles:
1520

16-
6.启动所有SpringBoot服务后,浏览器访问 http://127.0.0.1:8070/client/test 进行测试。
17-
18-
### 相关文章:
19-
20-
- [Spring Security OAuth2 内省协议与 JWT 结合使用指南](https://relive27.github.io/blog/oauth2-introspection-with-jwt)
21+
- [Spring Security OAuth2 Introspection Protocol in conjunction with JWT Guide](https://relive27.github.io/blog/oauth2-introspection-with-jwt)

oauth2-jwk-consul-config/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
### 相关信息:
1+
## Relevant Information:
22

3-
该模块演示了 OAuth2.0 授权服务通过 Consul 实现密钥轮换,如果您并不了解 Consul,请利用一些时间阅读 [Consul](https://www.consul.io/) 官网提供的信息。 Consul KV Store
4-
提供了一个分层的KV存储, 能够存储分布式键值,我们将利用 Consul KV Store 使资源服务器发现授权服务器的公钥信息, 授权服务器轮换密钥后将公钥通过HTTP API更新到 KV Store。
3+
This module demonstrates that the OAuth2.0 authorization service implements key rotation through Consul. If you don't
4+
know Consul, please take some time to read the information provided by [Consul]((https://www.consul.io/) )'s official
5+
website. Consul KV Store provides a hierarchical KV store that can store distributed key values. We will use Consul KV
6+
Store to enable the resource server to discover the public key information of the authorization server. After the
7+
authorization server rotates the key, the public key will be updated to KV Store.
58

6-
### 相关文章:
9+
## Relevant Articles:
710

8-
- [将Spring Security OAuth2授权服务JWK与Consul 配置中心结合使用](https://relive27.github.io/blog/oauth2-jwk-consul-config)
11+
- [Using Spring Security OAuth2 Authorization Service JWK with Consul Configuration Center](https://relive27.github.io/blog/oauth2-jwk-consul-config)

oauth2-jwk-redis/README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
### 相关信息:
1+
## Relevant Information:
22

3-
该模块提供支持密钥轮换策略的`JWKSource`。 RotateJwkSource 是一种JWKSource利用 JWKSetCache 来支持密钥轮换实现。
3+
This module provides a `JWKSource` that supports key rotation strategies. RotateJwkSource is a JWKSource implementation
4+
that utilizes JWKSetCache to support key rotation.
45

5-
除了工程中默认 Redis 实现方式,还支持本地内存和Caffeine实现方式。
6+
In addition to the default Redis implementation in the project, it also supports local memory and Caffeine
7+
implementations.
68

7-
以下代码显示了如何配置本地内存密钥轮换策略的`RotateJwkSource`提供支持的示例:
9+
The following code shows an example of how to configure the `RotateJwkSource` of the local in-memory key rotation
10+
strategy to provide support:
811

912
```
1013
@Bean
@@ -13,7 +16,7 @@
1316
}
1417
```
1518

16-
`RotateJwkSource`还支持使用Caffeine的密钥轮换策略,可以按如下方式配置:
19+
`RotateJwkSource` also supports using Caffeine's key rotation strategy, which can be configured as follows:
1720

1821
```
1922
@Bean
@@ -22,6 +25,6 @@
2225
}
2326
```
2427

25-
### 相关文章:
28+
## Relevant Articles:
2629

27-
- [Spring Security OAuth2实现简单的密钥轮换及配置资源服务器JWK缓存](https://relive27.github.io/blog/jwk-cache-and-rotate-key)
30+
- [Spring Security OAuth2 implements simple key rotation and configures resource server JWK cache](https://relive27.github.io/blog/jwk-cache-and-rotate-key)

oauth2-jwt/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
### 相关信息:
1+
## Relevant Information:
22

3-
该模块演示了如何让我们的 Spring Authorization Server 实现使用 JSON Web 令牌。在启动工程前,你需要更改`oauth2-server``application.yml`文件 MySQL
4-
的用户名和密码,SQL表的创建使用 [Flyway](https://flywaydb.org) 数据库版本控制组件。
3+
This module demonstrates how to get our Spring Authorization Server implementation to use JSON Web Token. Before
4+
starting the project, you need to change the username and password of MySQL in the `application.yml` file
5+
in `oauth2-server`. SQL tables are created using the [Flyway](https://flywaydb.org) database versioning component.
56

6-
你可以使用 Docker 快速启动一个MySQL数据库:
7+
You can use Docker to quickly start a MySQL database:
78

89
```
910
docker run -p 3306:3306 --name mysql \
@@ -14,8 +15,9 @@ docker run -p 3306:3306 --name mysql \
1415
-d mysql:5.6
1516
```
1617

17-
启动服务后,浏览器访问 [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test) ,通过输入 admin/password 认证成功后,最终将返回资源信息。
18+
After starting the service, the browser visits [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test).
19+
After successful authentication by entering admin/password, the resource information will eventually be returned.
1820

19-
### 相关文章:
21+
## Relevant Articles:
2022

21-
- [将JWT与Spring Security OAuth2结合使用](https://relive27.github.io/blog/spring-security-oauth2-jwt)
23+
- [Using JWT with Spring Security OAuth2](https://relive27.github.io/blog/spring-security-oauth2-jwt)

oauth2-login/README.md

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1+
## Relevant Information:
12

2-
### 相关信息:
3-
1.`authorizationserver`作为授权服务器,提供自定义/userInfo用户信息端点。
4-
<br><br>
5-
2.`authorizationserver`注册了一个客户端:
6-
- clientId: relive-client
7-
- clientSecret: relive-client
8-
- redirectUri: http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code
9-
- scope: profile
10-
11-
3.`authorizationserver`使用Form表单认证,用户名密码:admin/password。
12-
<br><br>
13-
4.`oauth2-login-client`是一个OAuth2客户端,它包含Form表单登录和OAuth2登录。
14-
<br><br>
15-
5.`oauth2-login-client`Form登录用户(admin/password)赋予*ROLE_SYSTEM*角色,拥有该角色的用户登录成功将在页面看到以下内容:
16-
17-
**Article List**
18-
- Java
19-
- Python
20-
- C++
21-
22-
<br><br>
23-
6.`oauth2-login-client`还将支持OAuth2登录,使用*GrantedAuthoritiesMapper*`authorizationserver`授权服务角色*ROLE_ADMIN*映射为客户端服务*ROLE_OPERATION*角色,
24-
登录成功后拥有*ROLE_OPERATION*角色的用户将在页面看到以下内容:
25-
26-
**Article List**
27-
- Java
28-
29-
<br><br>
30-
7.启动服务,访问http://127.0.0.1:8070/home ,首先使用Form表单登录,其次退出登录,使用OAuth2登录,您将看到不同的展示信息。
31-
32-
### 相关文章:
33-
- [Spring Security OAuth2登录](https://relive27.github.io/blog/oauth2-login)
3+
1. `authorizationserver` acts as an authorization server and provides a custom /userInfo user information endpoint.
4+
5+
2. The `authorizationserver` registers a client:
6+
- clientId: relive-client
7+
- clientSecret: relive-client
8+
- redirectUri: http://127.0.0.1:8070/login/oauth2/code/messaging-client-authorization-code
9+
- scope: profile
10+
11+
3. `authorizationserver` uses *Form authentication*, username and password: admin/password.
12+
13+
4. `oauth2-login-client` is an OAuth2 client, which includes *Form login* and OAuth2 login.
14+
15+
5. The `oauth2-login-client` *Form* *login* user (admin/password) is assigned the ROLE_SYSTEM role, and users with this
16+
role will see the following content on the page after successful login:
17+
18+
**Article List**
19+
20+
- Java
21+
- Python
22+
- C++
23+
24+
6. `oauth2-login-client` will also support OAuth2 login. Make GrantedAuthoritiesMapper map the `authorizationserver`
25+
authorization service role **ROLE_ADMIN** to the client service **ROLE_OPERATION** role. Users with the **
26+
ROLE_OPERATION** role will see the following content on the page after successful login:
27+
28+
**Article List**
29+
30+
- Java
31+
32+
33+
7. Start the service, visit [http://127.0.0.1:8070/home](http://127.0.0.1:8070/home). First use the username to log in,
34+
then log out, and use OAuth2 to log in, you will see different display information.
35+
36+
## Relevant Articles:
37+
38+
- [Spring Security OAuth2 Login](https://relive27.github.io/blog/oauth2-login)

oauth2-opaque-token/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1+
## Relevant Articles:
12

2-
### 相关文章:
3-
4-
- [Spring Security OAuth2 Opaque 令牌的简单使用指南](https://relive27.github.io/blog/oauth2-opaque-token)
3+
- [A Simple Guide to Using Spring Security OAuth2 Opaque Tokens](https://relive27.github.io/blog/oauth2-opaque-token)

oauth2-persistence-client/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
### 相关信息:
1+
## Relevant Information:
22

3-
本例`persistence-client`服务中我们通过实现 ClientRegistrationRepository 接口自定义持久化存储库 *JdbcClientRegistrationRepository*
4-
。在我们启动服务测试之前,你需要拥有一个MySQL数据库。 你可以使用 Docker 快速启动一个MySQL数据库:
3+
In this example `persistence-client` service, we implement the custom persistence repository
4+
JdbcClientRegistrationRepository. Before we start the service test, you need to have a MySQL database. You can quickly
5+
start a MySQL database using Docker:
56

67
```
78
docker run -p 3306:3306 --name mysql \
@@ -12,9 +13,10 @@ docker run -p 3306:3306 --name mysql \
1213
-d mysql:5.6
1314
```
1415

15-
在你将`application.yml`中数据库用户名密码修改后,使用浏览器访问 [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test)
16-
,其中登录所需用户名密码为 admin/password 。
16+
After you modify the database username and password in `application.yml`, use a browser to
17+
visit [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test). The username and password required for
18+
login are admin/password.
1719

18-
### 相关文章:
20+
## Relevant Articles:
1921

20-
- [Spring Security 持久化OAuth2客户端](https://relive27.github.io/blog/persisrence-oauth2-client)
22+
- [Spring Security Persistent OAuth2 Client](https://relive27.github.io/blog/persisrence-oauth2-client)

oauth2-pkce/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
### 相关信息:
1+
## Relevant Information:
22

3-
该模块演示了代码交换证明密钥(PKCE)的授权码流,值得注意的是我们在授权服务注册客户端时`ClientAuthenticationMethod`选择的是`none`方式。我们将
4-
服务启动完成后,浏览器访问 [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test) 测试完整流程。
3+
This module demonstrates the authorization code flow of the code exchange proof key (PKCE). It is worth noting that when
4+
we register the client with the authorization service, the `ClientAuthenticationMethod` selects the `none` method. After
5+
we start the service, the browser visits [http://127.0.0.1:8070/client/test](http://127.0.0.1:8070/client/test) to test
6+
the complete process.
57

6-
> 记得认证所使用的用户名密码为 admin/password
78

8-
### 相关文章:
9+
> Remember that the username and password used for authentication are admin/password
910
10-
- [Spring Security OAuth2 带有用于代码交换的证明密钥 (PKCE) 的授权码流](https://relive27.github.io/blog/oauth2-pkce)
11+
## Relevant Articles:
12+
13+
- [Authorization Code Flow with Proof Key for Code Exchange (PKCE)](https://relive27.github.io/blog/oauth2-pkce)
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1+
## Relevant Articles:
12

2-
### 相关文章:
3-
4-
- [Spring Security OAuth 2.0授权服务器结合Redis实现获取accessToken速率限制](https://relive27.github.io/blog/oauth2-token-access-restrictions)
3+
- [Spring Security OAuth 2.0 Authorization Server Combined with Redis implements Access to AccessToken Rate Limits](https://relive27.github.io/blog/oauth2-token-access-restrictions)

0 commit comments

Comments
 (0)