logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.15k stars 395 forks source link

refactor(core): refactor organizations in grants #6208

Closed wangsijie closed 1 month ago

wangsijie commented 1 month ago

Summary

Refactor 3 grants: extract organization token code to a util function.

Testing

Existing tests should pass.

Checklist

github-actions[bot] commented 1 month ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +532 Bytes

Diff by File |Name|Diff| |---|---| |packages/core/src/oidc/grants/client-credentials.ts|:chart_with_upwards_trend: +854 Bytes| |packages/core/src/oidc/grants/refresh-token.test.ts|:chart_with_upwards_trend: +809 Bytes| |packages/core/src/oidc/grants/refresh-token.ts|:chart_with_upwards_trend: +2.3 KB| |packages/core/src/oidc/grants/token-exchange/index.ts|:chart_with_upwards_trend: +928 Bytes| |packages/core/src/oidc/grants/utils.ts|:chart_with_upwards_trend: +3.59 KB| |packages/integration-tests/src/tests/api/oidc/refresh-token-grant.test.ts|:chart_with_upwards_trend: +181 Bytes|