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.5k stars 419 forks source link

feat(core): issue organization token via client credentials #6098

Closed gao-sun closed 3 months ago

gao-sun commented 3 months ago

Summary

implement client_credentials grant for organization access tokens (with and without resource)

Testing

integration tests added

Checklist

github-actions[bot] commented 3 months ago

COMPARE TO master

Total Size Diff :warning: :chart_with_upwards_trend: +21.05 KB

Diff by File |Name|Diff| |---|---| |packages/core/src/oidc/grants/client-credentials.test.ts|:chart_with_upwards_trend: +4.52 KB| |packages/core/src/oidc/grants/client-credentials.ts|:chart_with_upwards_trend: +2.61 KB| |packages/core/src/oidc/grants/refresh-token.test.ts|:chart_with_upwards_trend: +13 Bytes| |packages/core/src/oidc/grants/refresh-token.ts|:chart_with_upwards_trend: +2 Bytes| |packages/core/src/oidc/init.ts|:chart_with_upwards_trend: +147 Bytes| |packages/core/src/oidc/resource.ts|:chart_with_upwards_trend: +804 Bytes| |packages/core/src/queries/organization/application-role-relations.ts|:chart_with_upwards_trend: +2.4 KB| |packages/integration-tests/src/api/api.ts|:chart_with_upwards_trend: +89 Bytes| |packages/integration-tests/src/api/application.ts|:chart_with_upwards_trend: +91 Bytes| |packages/integration-tests/src/tests/api/application/application.roles.test.ts|:chart_with_upwards_trend: +63 Bytes| |packages/integration-tests/src/tests/api/oidc/client-credentials-grant.test.ts|:warning: :chart_with_upwards_trend: +10.96 KB|