CHANGELOGS.md 17.0 KB
Newer Older
智布道's avatar
智布道 已提交
1 2
## v1.0.6 (2021-10-**)

智布道's avatar
智布道 已提交
3
- feat: 正式支持 LDAP 用户登录认证
智布道's avatar
智布道 已提交
4
- feat: 重构发布快照流水线。 (Github PR [#15](https://github.com/fujieid/jap/pull/15))
智布道's avatar
智布道 已提交
5
- feat: 修复文案的错误,统一配置类中的时间类型。 (Github PR [#16](https://github.com/fujieid/jap/pull/16))
智布道's avatar
智布道 已提交
6 7
- change: 修改 JapUserService 接口中的 createAndGetHttpApiUser 方法名使其更符合语义。 (Github PR [#13](https://github.com/fujieid/jap/pull/13))
- change: 为 `AbstractJapStrategy` 的子类增加构造函数,支持自定义 `JapUserStore`
智布道's avatar
智布道 已提交
8
- change: [jap-ids] 将 AccessToken 中的 LocalDateTime 改为 Date
智布道's avatar
智布道 已提交
9 10 11
- change: 升级 `hutool` 的版本为 5.7.14
- change: 升级 `JustAuth` 的版本为 1.16.5
- change: 更新了一些错误的文案
智布道's avatar
智布道 已提交
12 13
----

智布道's avatar
智布道 已提交
14
- feat: Support LDAP user login authentication.
智布道's avatar
智布道 已提交
15
- feat: fix PR bug and refactory publish snapshot. (Github PR [#15](https://github.com/fujieid/jap/pull/15))
16
- feat: fix the copywriting error and unify the time type in the configuration class. (Github PR [#16](https://github.com/fujieid/jap/pull/16))
智布道's avatar
智布道 已提交
17
- change: optimize JapUserService interface to fix jap-http-api module. (Github PR [#13](https://github.com/fujieid/jap/pull/13))
智布道's avatar
智布道 已提交
18
- change: Add a constructor for subclasses of `AbstractJapStrategy`, support custom `JapUserStore`
智布道's avatar
智布道 已提交
19
- change: [jap-ids] Change the LocalDateTime in AccessToken to Date
智布道's avatar
智布道 已提交
20 21
- change: Upgrade `hutool` to `5.7.14`
- change: Upgrade `JustAuth` to `1.16.5`
智布道's avatar
智布道 已提交
22

智布道's avatar
智布道 已提交
23
## v1.0.5 (2021-09-23)
智布道's avatar
智布道 已提交
24 25 26 27

- feat: Add `jap-http-api` module. (Gitee Issue [#I43ZS7](https://gitee.com/fujieid/jap/issues/I43ZS7))
- feat: Add `jap-ids-web` module. Package the filter of ids as a separate component.
- feat: add HTTP servlet adapter to decouple jakarta servlets. **Note [1]**
智布道's avatar
智布道 已提交
28 29
- feat: [jap-social] Support to bind the account of the third-party platform. (Gitee
  Issue [#I46J6W](https://gitee.com/fujieid/jap/issues/I46J6W))
智布道's avatar
智布道 已提交
30
- change: [jap-ids] scope changed to optional.
智布道's avatar
智布道 已提交
31 32
- change: [jap-sso] Upgrade `kisso` to 3.7.7, **Solve the vulnerability of jackson**.
- change: [jap-mfa] Upgrade `googleauth` to 1.5.0, **Solve the vulnerability of apache httpclient**.
智布道's avatar
智布道 已提交
33 34 35
- change: Replace the theme of the document site [https://justauth.plus](https://justauth.plus) to solve the problem of
  the soaring memory of the document site. (Gitee Issue [I4958H](https://gitee.comfujieidjapissuesI4958H) | Github
  Issue [8](https://github.comfujieidjapissues8))
智布道's avatar
智布道 已提交
36 37 38 39 40 41
- change: Upgrade `simple-http` to 1.0.5.
- change: Upgrade `JustAuth` to 1.16.4.
- change: Optimize code.

**Note [1]:**

智布道's avatar
智布道 已提交
42 43
In versions prior to version 1.0.5 of jap, rely on the `HttpServletRequest`, `Cookie`, `HttpServletResponse`,
and `HttpSession` under the `javax.servlet.http` package in `jakarta-servlet`, such as:
智布道's avatar
智布道 已提交
44 45 46 47

```java
// Interface provided by jap
public interface JapStrategy {
智布道's avatar
智布道 已提交
48 49 50
  default JapResponse authenticate(AuthenticateConfig config, HttpServletRequest request, HttpServletResponse response) {
    return null;
  }
智布道's avatar
智布道 已提交
51 52 53 54 55
}
```

```java
// Use jap in spring framework
智布道's avatar
智布道 已提交
56
XxJapStrategy.authenticate(config,request,response);
智布道's avatar
智布道 已提交
57 58
```

智布道's avatar
智布道 已提交
59 60
In order to improve the adaptability of the framework, since version 1.0.5, JAP removed the dependency
of `jakarta-servlet` and adopted a new set of interfaces (reference: [jap-http](https://gitee.comfujieidjap-http) ).
智布道's avatar
智布道 已提交
61 62 63 64 65 66 67

The developer needs to adapt the original request when calling the JAP interface.

For example, if the developer uses `jakarta-servlet`, then the `HttpServletRequest` needs to be adapted:

```java
// Use 1.0.5 or higher version of jap in spring framework
智布道's avatar
智布道 已提交
68
XxJapStrategy.authenticate(config,new JakartaRequestAdapter(request),new JakartaResponseAdapter(response));
智布道's avatar
智布道 已提交
69 70 71 72 73 74 75
```

----

- feat: 增加 `jap-http-api` 模块。 (Gitee Issue [#I43ZS7](https://gitee.com/fujieid/jap/issues/I43ZS7))
- feat: 增加 `jap-ids-web` 模块。 将 `jap-ids` 的过滤器打包为一个单独的组件。
- feat: 添加 HTTP servlet 适配器以解耦 jakarta servlet。**注[1]**
智布道's avatar
智布道 已提交
76 77
- feat: [jap-social] 支持绑定第三方平台账号,该版本将社会化登录和绑定账号独立开来,以使其更加使用与多场景。 (Gitee
  Issue [#I46J6W](https://gitee.com/fujieid/jap/issues/I46J6W))
智布道's avatar
智布道 已提交
78
- change: [jap-ids] `scope` 在各个流程中都更改为可选,遵循 RFC6749 规范。
智布道's avatar
智布道 已提交
79 80
- change: [jap-sso] 升级 `kisso` 的版本为 3.7.7, **解决 jackson 的漏洞**
- change: [jap-mfa] 升级 `googleauth` 的版本为 1.5.0, **解决 apache httpclient 的漏洞**
智布道's avatar
智布道 已提交
81 82
- change: 替换文档站主题 https://justauth.plus,解决文档站内存暴涨的问题。(Gitee Issue [#I4958H](https://gitee.com/fujieid/jap/issues/I4958H)
  | Github Issue [#8](https://github.com/fujieid/jap/issues/8 )
智布道's avatar
智布道 已提交
83 84
- change: 升级 `simple-http` 的版本为 1.0.5.
- change: 升级 `JustAuth` 的版本为 1.16.4.
智布道's avatar
智布道 已提交
85
- change: 优化代码,添加 package-info。
智布道's avatar
智布道 已提交
86 87 88

**注[1]:**

智布道's avatar
智布道 已提交
89 90
在 1.0.5 以前版本,jap 中依赖 `jakarta-servlet``javax.servlet.http` 包下的 `HttpServletRequest``Cookie``HttpServletResponse`
`HttpSession`,比如:
智布道's avatar
智布道 已提交
91 92 93 94

```java
// jap 提供的接口
public interface JapStrategy {
智布道's avatar
智布道 已提交
95 96 97
  default JapResponse authenticate(AuthenticateConfig config, HttpServletRequest request, HttpServletResponse response) {
    return null;
  }
智布道's avatar
智布道 已提交
98 99 100 101 102
}
```

```java
// 在spring框架中使用 jap
智布道's avatar
智布道 已提交
103
XxJapStrategy.authenticate(config,request,response);
智布道's avatar
智布道 已提交
104 105
```

智布道's avatar
智布道 已提交
106 107
为了提高框架适配性,自 1.0.5 版本开始,JAP 去掉了 `jakarta-servlet` 依赖,采用了一套全新的接口(参考:[jap-http](https://gitee.com/fujieid/jap-http)),开发者在调用
JAP 接口时需要对原 request 进行适配。
智布道's avatar
智布道 已提交
108 109 110 111 112

比如,开发者使用了 `jakarta-servlet`,那么需要对 `HttpServletRequest` 进行适配处理:

```java
// 在spring框架中使用 1.0.5 或更高级版本的 jap
智布道's avatar
智布道 已提交
113
XxJapStrategy.authenticate(config,new JakartaRequestAdapter(request),new JakartaResponseAdapter(response));
智布道's avatar
智布道 已提交
114 115 116
```

## v1.0.4 (2021-08-15)
智布道's avatar
智布道 已提交
117

118
- fix: [jap-ids] Support to generate custom token. (Gitee[#I3U1ON](https://gitee.com/fujieid/jap/issues/I3U1ON))
智布道's avatar
智布道 已提交
119 120
- fix: [jap-ids] Support custom verification of client_secret, such as: BCrypt, etc. (
  Gitee[#I44032](https://gitee.com/fujieid/jap/issues/I44032))
智布道's avatar
智布道 已提交
121
- feat: [jap-ids] When `IdsConfig#enableDynamicIssuer` is `true`, custom `context-path` is supported.
智布道's avatar
智布道 已提交
122 123
- fix: [jap-ids] Solve the problem of "After refreshing the token, the user information cannot be obtained with the new
  access token". ([#I3XHTK](https://gitee.com/fujieid/jap/issues/I3XHTK))
智布道's avatar
智布道 已提交
124
- feat: [jap-oauth2] `Oauth2Strategy` supports the following methods: `refreshToken`, `revokeToken`, `getUserInfo`
智布道's avatar
智布道 已提交
125 126
- fix: [jap-social] Cannot customize `JapCache` and `AuthStateCache` of `SocialStrategy` at the same time. (
  Github[#6](https://github.com/fujieid/jap/issues/6))
127
- fix: [jap-core] fix npe bug. (Github[#5](https://github.com/fujieid/jap/issues/5))
智布道's avatar
智布道 已提交
128
- doc: change the template of issue and PR
智布道's avatar
智布道 已提交
129 130

----
智布道's avatar
智布道 已提交
131

智布道's avatar
智布道 已提交
132 133 134 135
- fix: [jap-ids] 支持生成自定义 token(包含 access_token 和 refresh_token)。 (
  Gitee[#I3U1ON](https://gitee.com/fujieid/jap/issues/I3U1ON))
- fix: [jap-ids] 支持自定义验证 `client_secret`,适配多种场景,如:BCrypt 等。 (
  Gitee[#I44032](https://gitee.com/fujieid/jap/issues/I44032))
智布道's avatar
智布道 已提交
136
- feat: [jap-ids] 当启用 `IdsConfig#enableDynamicIssuer` 时,支持自定义 `context-path`
137
- fix: [jap-ids] 解决“刷新token后,用新的access_token无法获取用户信息”问题。 (Gitee[#I3XHTK](https://gitee.com/fujieid/jap/issues/I3XHTK))
智布道's avatar
智布道 已提交
138
- feat: [jap-oauth2] `Oauth2Strategy` 支持使用以下方法: `refreshToken``revokeToken``getUserInfo`
智布道's avatar
智布道 已提交
139 140
- fix: [jap-social] 无法同时自定义`SocialStrategy``JapCache` and `AuthStateCache`.(
  Github[#6](https://github.com/fujieid/jap/issues/6))
141
- fix: [jap-core] 修复 `userId` 为空时 NPE 异常. (Github[#5](https://github.com/fujieid/jap/issues/5))
智布道's avatar
智布道 已提交
142
- doc: 更改 issue 和 pr 的模板
智布道's avatar
智布道 已提交
143

智布道's avatar
智布道 已提交
144 145 146 147 148 149 150 151
## v1.0.3 (2021-07-28)

- (**fix**): a bug of JwkUtil
- (**fix**): cannot refresh token
- (**pr**): Merge Gitee PR [#16](https://gitee.com/fujieid/jap/pulls/16) by [@lowis](https://gitee.com/lowis)
- (**issue**): Fix Gitee [#I3YWTD](https://gitee.com/fujieid/jap/issues/I3YWTD)
- Upgrade justauth to 1.16.2

智布道's avatar
智布道 已提交
152
## v1.0.2 (2021-05-24)
智布道's avatar
智布道 已提交
153 154 155

### New features

智布道's avatar
智布道 已提交
156
- **jap-ids**
智布道's avatar
智布道 已提交
157 158
  - Add the `enableDynamicIssuer` in `IdsConfig`. When `enableDynamicIssuer=true`, jap ids will automatically
    extract `issuer` from the currently requested domain name.
智布道's avatar
智布道 已提交
159 160 161
  - Add the `loginPageUrl` in `IdsConfig`:
    - `loginPageUrl`: login form page url
    - `loginUrl`: The api url for login
智布道's avatar
智布道 已提交
162 163 164 165 166 167 168
  - Add the `externalLoginPageUrl` in `IdsConfig`. when the login page is not provided by an authorized service (the
    login page is hosted by other services), you need to enable this configuration.
  - Add the `externalConfirmPageUrl` in `IdsConfig`. When the authorization confirmation page is not provided by an
    authorized service (the authorization confirmation page is hosted by other services), you need to enable this
    configuration.
  - Add the `authorizeAutoApproveUrl` in `IdsConfig`. When the authorize url contains `autoapprove=true`, it will not
    jump to the `confirmPageUrl`, but will jump directly to the `authorizeAutoApproveUrl`.
智布道's avatar
智布道 已提交
169
  - Add some scopes, such as `profile`, `address`, `read` and `write`.
智布道's avatar
智布道 已提交
170 171
  - Add the `uid` in the `OauthUtil#createAuthorizeUrl(String, IdsRequestParam)`.
  - Add the `IdsUserStoreService` interface to support custom operations on user data after login.
智布道's avatar
智布道 已提交
172 173
  - Add the `IdsPipeline` interface, developers can customize the process, currently only supports the process of
    customizing `IdsxxFilter` and `LoginEndpoint`.
智布道's avatar
智布道 已提交
174 175
  - Add `SPI` plugin mechanism

智布道's avatar
智布道 已提交
176 177
- **jap-social**
  - `SocialStrategy` provides methods of `refreshToken`, `revokeToken`, and `getUserInfo`
智布道's avatar
智布道 已提交
178

智布道's avatar
智布道 已提交
179 180
### Modified

智布道's avatar
智布道 已提交
181 182
- **jap**
  - `javax.servlet-api` -> `jakarta.servlet-api`
智布道's avatar
智布道 已提交
183

智布道's avatar
智布道 已提交
184 185
- **jap-ids**
  - Modify `IdsConfig.confirmUrl` to `confirmPageUrl`.
智布道's avatar
智布道 已提交
186 187
  - Modify the return value of `ApprovalEndpoint#getAuthClientInfo(HttpServletRequest)`
    to `IdsResponse<String, Map<String, Object>>`.
智布道's avatar
智布道 已提交
188 189 190 191 192 193 194 195
  - Modify the return value of `Ap provalEndpoint#authorize(HttpServletRequest)` to `IdsResponse<String, String>`.
  - Modify the return value of `AuthorizationEndpoint#agree(HttpServletRequest)` to `IdsResponse<String, String>`.
  - Modify the return value of `LoginEndpoint#signin(HttpServletRequest)` to `IdsResponse<String, String>`.
  - Modify the return value of `LogoutEndpoint#logout(HttpServletRequest)` to `IdsResponse<String, String>`.
  - Modify the comment content of `ClientDetail`.
  - Modify the return type of `IdsResponse#getData()` to the specified generic.
  - Remove `IdsScopeProvider#initScopes(List<IdsScope>)`.
  - When `response_type=id_token`, the resulting Claims are returned in the ID Token.
智布道's avatar
智布道 已提交
196 197 198 199
  - Optimize the process of `UserInfoEndpoint#getCurrentUserInfo(HttpServletRequest)`, Response UserInfo Claims using
    Scope Values.
  - Modify the `loginByUsernameAndPassword` and `getByName` methods of the `IdsUserService` interface, and add
    the `clientId` parameter, which can be used to distinguish multi-tenant scenarios
智布道's avatar
智布道 已提交
200 201 202

### PR

智布道's avatar
智布道 已提交
203 204 205 206 207 208
- Gitee
  - Merge PR [#11](https://gitee.com/fujieid/jap/pulls/11) by [@dreamlu](https://gitee.com/dreamlu)
  - Merge PR [#12](https://gitee.com/fujieid/jap/pulls/12) by [@sywd](https://gitee.com/sywd)
  - Merge PR [#13](https://gitee.com/fujieid/jap/pulls/13) by [@dreamlu](https://gitee.com/dreamlu)
  - Merge PR [#14](https://gitee.com/fujieid/jap/pulls/14) by [@dreamlu](https://gitee.com/dreamlu)

智布道's avatar
智布道 已提交
209 210 211
### Issue

## v1.0.1(2021-04-21)
智布道's avatar
智布道 已提交
212 213 214

### New features

智布道's avatar
智布道 已提交
215
- Add `com.fujieid.jap.core.util.RequestUtil`
智布道's avatar
智布道 已提交
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
- **Complete the development of the `jap-ids` module, and provide oauth services externally based on `jap-ids`**
  - **Supported features**
    - Authorization Code Grant
    - Proof Key for Code Exchange
    - Implicit Grant
    - Resource Owner Password Credentials Grant
    - Client Credentials Grant
    - Refresh access token
    - Revoke access token
    - Get the currently authorized user
    - Verify login status
    - Abnormal prompt
    - Sign out
    - OpenID Connect Discovery
    - JWK Endpoint
    - Custom jwt encryption and decryption certificate
智布道's avatar
智布道 已提交
232 233
    - Support multiple response types, such as: `code`, `token`, `id token`, `id token token`, `code id token`
      , `code token`, `code id token token`
智布道's avatar
智布道 已提交
234
    - ...
智布道's avatar
智布道 已提交
235 236 237 238

For more details about the use of `jap-ids`, please refer to the sample
project: [jap-ids-demo](https://gitee.com/fujieid/jap-ids-demo), or refer to the
document: [IDS OAuth 2.0 服务端]( https://justauth.plus/ids/)
智布道's avatar
智布道 已提交
239 240

### Modified
智布道's avatar
智布道 已提交
241

智布道's avatar
智布道 已提交
242
- [jap-oidc] Optimize the `OidcStrategy#authenticate` method, cache the `OidcDiscoveryDto`, and reduce unnecessary http
智布道's avatar
智布道 已提交
243 244
  requests
- [jap-oidc] Optimize the code of `OidcUtil`, fix known bugs
智布道's avatar
智布道 已提交
245
- [jap-social] fix known bugs
智布道's avatar
智布道 已提交
246
- Refactor `com.fujieid.jap.core.cache.JapLocalCache`, implement timer manually, clean local cache regularly
智布道's avatar
智布道 已提交
247 248 249 250

### PR

- Merge Gitee PR [#9](https://gitee.com/fujieid/jap/pulls/9) by [@dreamlu](https://gitee.com/dreamlu)
智布道's avatar
智布道 已提交
251

智布道's avatar
智布道 已提交
252 253 254 255
### Issue

- Fix Gitee Issue [#I3DC7N](https://gitee.com/fujieid/jap/issues/I3DC7N)

智布道's avatar
智布道 已提交
256 257 258
## v1.0.1-alpha.1(2021-03-07)

### Modified
智布道's avatar
智布道 已提交
259 260 261

- Fix the description error in `JapErrorCode`
- Improve the `JapTokenHelper`
智布道's avatar
智布道 已提交
262 263 264

### PR

智布道's avatar
智布道 已提交
265
- Merge Gitee PR [#8](https://gitee.com/fujieid/jap/pulls/8)
智布道's avatar
智布道 已提交
266

智布道's avatar
智布道 已提交
267
## v1.0.1-alpha(2021-03-05)
智布道's avatar
智布道 已提交
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373

### jap-core

#### New features

- Add `JapErrorCode` enumeration class to manage exception codes and exception prompts
- Add `JapResponse` class to standardize interface return content
- Add `JapTokenHelper` class to manage user tokens uniformly
- Add `JapContext` class to maintain jap context information
- Add `JapAuthentication` class, unified management of login status information and jap context information

#### Modified

- Package structure
  - Move `AuthenticateConfig`, `JapConfig` to `com.fujieid.jap.core.config` package
  - Move `JapUtil` to `com.fujieid.jap.core.util` package
- delete
  - Delete `JapCacheContextHolder`
  - Delete `JapUserStoreContextHolder`
- Code
  - Refactored `AbstractJapStrategy`, introduced `JapContext` and `JapAuthentication` classes
  - Refactor the `JapConfig` class, only retain the `sso` and `ssoConfig` attributes, and add the `tokenExpireTime`
    and `cacheExpireTime` attributes at the same time
  - Modify the default validity period of the cache in `JapCacheConfig` to 7 days
  - Modify the default content in the `JapUserService` interface class
  - Add the `void remove key( string key)` method to `JapCache`
  - Add `errorCode` and `errorMessage` attributes in `JapException` to facilitate the processing of exception
    information into unified format return data
  - Add the `token` attribute to `JapUser`, and the jap token will be automatically returned after login
  - In the `JapStrategy` interface, the return type of the `authenticate` method is changed to `JapResponse`, and the
    strategy methods of all modules return data in a unified format
  - Mark the `redirect` method with `@Deprecated` in the `JapUtil` class, and it may be deleted in the future. At the
    same time add the `createToken` method

### jap-oauth2

- Modify the `authenticate` method of `Oauth2Strategy` to return` JapResponse`

### jap-oidc

- Modify the `authenticate` method of `OidcStrategy` to return` JapResponse`

### jap-simple

- Modify the `authenticate` method of `SimpleStrategy` to return` JapResponse`

### jap-social

- Modify the `authenticate` method of `SocialStrategy` to return` JapResponse`

### jap-sso

- Modify the return value of the `JapSsoHelper#login` method to the jap token of the current user
- Add `JapSsoUtil`
- In the `japSsoConfig` class, delete the `login url` and `logout url` attributes

### Other

- Add some unit tests

## v1.0.0(2021-02-18)

### New features

- added `jap-mfa` module to realize TOTP verification
- The `logout` method is added to the `JapUserStoreContextHolder` to support clearing cookies and sessions
- added test cases

### Modified

- Updated `jap.sh`, support a variety of common commands
- The `options` attribute in `JapConfig` is deleted, and the `justathConfig` attribute is added to `SocialConfig`
- Change the name of `RemberMeDetailsUtils` to `RembermeUtils`
- Move the `Oauth2Strategy#checkOauthConfig()` and `Oauth2Strategy#isCallback()` to the `Oauth2Util`

### Other

- Improved code
- Reconstruct the `SimpleConfig`, and move the unnecessary configuration items and business logic to
  the `RememberMeUtils`

## v1.0.0-alpha.1(2021-02-01)

### New features

- Add cache module `com.fujieid.jap.core.cache.JapCache`
- Add 'state' verification logic in `jap-oauth2`
- Add some `package-info.java`

### Modified

- Revision notes
- To solve the problem that 'codeverifier' in 'pkceutil' can only be cached locally
- Upgrade `simple-json` to `0.0.2`

### other

- Fix Javadoc compilation failure

## 1.0.0-alpha(2021-01-28)

JA Plus(JAP) is an open source authentication middleware, it is highly decoupled from business code and has good
modularity and flexiblity. Developers could integrate JAP into web applications effortlessly.

## Completed

374 375 376 377 378
- [login of username-password](https://justauth.plus/quickstart/jap-simple/)
- [login of Social](https://justauth.plus/quickstart/jap-social/)
- [login of OAuth 2.0](https://justauth.plus/quickstart/jap-oauth2/)
- [login of oidc](https://justauth.plus/quickstart/jap-oidc/)
- [SSO](https://justauth.plus/quickstart/jap-sso/)
智布道's avatar
智布道 已提交
379