Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add LoginHandlerEnhancer for enhanced login processing #6176

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Jun 27, 2024

What type of PR is this?

/kind improvement
/area core
/milestone 2.17.x

What this PR does / why we need it:

新增 LoginHandlerEnhancer 用于 Halo 扩展登录成功或失败后的处理逻辑如 RememberMe 和设备管理等

Does this PR introduce a user-facing change?

新增 LoginHandlerEnhancer 用于 Halo 扩展登录成功或失败后的处理逻辑

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note-none Denotes a PR that doesn't merit a release note. labels Jun 27, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.17.x milestone Jun 27, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Jun 27, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from LIlGG and wan92hen June 27, 2024 08:53
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 57.18%. Comparing base (bc10336) to head (51fa2bf).
Report is 42 commits behind head on main.

Files Patch % Lines
...un/halo/app/security/LoginHandlerEnhancerImpl.java 25.00% 3 Missing ⚠️
.../authentication/login/UsernamePasswordHandler.java 40.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6176      +/-   ##
============================================
+ Coverage     54.51%   57.18%   +2.67%     
- Complexity     3523     3720     +197     
============================================
  Files           646      648       +2     
  Lines         21862    21969     +107     
  Branches       1528     1536       +8     
============================================
+ Hits          11917    12563     +646     
+ Misses         9328     8796     -532     
+ Partials        617      610       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RememberMeServicesDeviceService 接口需要放到 api module 下面才能够被插件正确使用。

另外,如果只是针对登录的场景,看能否只提供一个接口专门用户登录成功之后的处理呢。在 Core 和插件中直接调用该接口实现登录成功后的逻辑。

@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2024
@guqing guqing changed the title chore: share device and rememberMe services with plugins feat: add LoginHandlerEnhancer for enhanced login processing Jul 1, 2024
@guqing guqing added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Jul 1, 2024
@guqing guqing requested a review from JohnNiang July 1, 2024 04:16
@guqing
Copy link
Member Author

guqing commented Jul 1, 2024

see also halo-sigs/plugin-oauth2#48

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

Copy link

f2c-ci-robot bot commented Jul 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 967eaa2 into halo-dev:main Jul 1, 2024
7 checks passed
@ruibaby ruibaby modified the milestones: 2.17.x, 2.17.0 Jul 1, 2024
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jul 1, 2024
@guqing guqing deleted the chore/shared-objects branch July 2, 2024 04:02
f2c-ci-robot bot pushed a commit to halo-dev/docs that referenced this pull request Jul 2, 2024
### What this PR does?
增加关于 LoginHandlerEnhancer 的使用文档

see also halo-dev/halo#6176

```release-note
None
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/docs Categorizes an issue or PR as relevant to SIG Docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants