Repository navigation
Commit a2413e0
committed
refactor(plugin-auth): move the buildPluginList body into auth-manager-plugin-list.ts
The body of AuthManager.buildPluginList() moves unedited into the module
function buildPluginList, re-indented one level: the reset of the
degraded-feature record and the JWT signing verdict, the enabled table
with its env and config precedence and the SCIM coherence re-check, and
every plugin in the same order (bearer, the organization factory's
arrow, twoFactor, breached-password rejection, admin, phoneNumber,
magicLink, the generic OAuth providers, the OIDC provider with its jwt
plugin, sso, scim, device authorization and the custom session). The
method keeps its place, docblock, signature and return type; it now
builds one host of the 22 AuthManager members the body reads (18
methods as late-bound closures, config and degradedFeatures as getters,
jwtSigningFailureReported and orgRolesMap as get/set pairs because the
body writes them) and returns buildPluginList.call(host). The async
moved from the method to the function.
The organization factory's arrow, which cut 15 left in the body, moves
with it and builds its host from this host, so it reaches the same
members and the same field as before.
readBooleanEnv and consentOrganizationOf, the two top-level declarations
of auth-manager.ts the body reads that the file did not export, are
exported in place and imported by value with the five that already
were; src/index.ts names its auth-manager.ts exports one by one, so
nothing new is published. Nine imported names leave auth-manager.ts
with the body.
Readers that follow it: the two plugin-factory scans read the module,
and the population comments in auth-email-locale.test.ts name it.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LSXBc2GCBwiAL7vV4kWkyr1 parent 10b8250 commit a2413e0
5 files changed
Lines changed: 961 additions & 813 deletions
File tree
- packages/plugins/plugin-auth/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
| 863 | + | |
| 864 | + | |
864 | 865 | | |
865 | 866 | | |
866 | 867 | | |
| |||
1125 | 1126 | | |
1126 | 1127 | | |
1127 | 1128 | | |
1128 | | - | |
1129 | | - | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1130 | 1132 | | |
1131 | 1133 | | |
1132 | 1134 | | |
| |||
0 commit comments