halo-dev / halo

强大易用的开源建站工具。
https://www.halo.run
GNU General Public License v3.0
34.02k stars 9.71k forks source link

Expose CryptoService and RateLimiterRegistry to plugins #6638

Closed JohnNiang closed 1 month ago

JohnNiang commented 2 months ago

What type of PR is this?

/kind feature /area core /area plugin /milestone 2.20.x

What this PR does / why we need it:

Currently, we are refactoring login and logout pages to make them extensible. If plugins want to realize a new authentication method, the CryptoService and RateLimiterRegistry may be used to authenticate.

So this PR exposes the two beans to plugins. No side effect will be introduced.

Does this PR introduce a user-facing change?

【开发相关】允许在插件使用 CryptoService 和 RateLimiterRegistry
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.05%. Comparing base (6cd8dc8) to head (3527606). Report is 61 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6638 +/- ## ============================================ - Coverage 58.18% 58.05% -0.13% - Complexity 3774 3917 +143 ============================================ Files 651 670 +19 Lines 22125 22980 +855 Branches 1538 1576 +38 ============================================ + Hits 12873 13341 +468 - Misses 8641 9022 +381 - Partials 611 617 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

JohnNiang commented 1 month ago

/ping @halo-dev/sig-halo

guqing commented 1 month ago

/sig docs

f2c-ci-robot[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

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: - ~~[OWNERS](https://github.com/halo-dev/halo/blob/main/OWNERS)~~ [guqing] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment