From a6be465ee68edcbd7f3e2895882a3117ea77230e Mon Sep 17 00:00:00 2001 From: Djam Date: Wed, 29 Nov 2023 16:29:20 +0100 Subject: [PATCH 1/2] fix: export oauth2Proxy as default so DI discovers it Signed-off-by: djamaile --- .changeset/chilly-lies-collect.md | 5 +++++ .../auth-backend-module-oauth2-proxy-provider/api-report.md | 3 ++- .../auth-backend-module-oauth2-proxy-provider/src/index.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/chilly-lies-collect.md diff --git a/.changeset/chilly-lies-collect.md b/.changeset/chilly-lies-collect.md new file mode 100644 index 0000000000..9af0c41099 --- /dev/null +++ b/.changeset/chilly-lies-collect.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-oauth2-proxy-provider': patch +--- + +Exported the plugin as default so it gets discovered by using `featureDiscoveryServiceFactory()` diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md b/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md index a07db4ce11..1a4c1ee6d6 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md +++ b/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md @@ -10,7 +10,8 @@ import { IncomingHttpHeaders } from 'http'; import { ProxyAuthenticator } from '@backstage/plugin-auth-node'; // @public (undocumented) -export const authModuleOauth2ProxyProvider: () => BackendFeature; +const authModuleOauth2ProxyProvider: () => BackendFeature; +export default authModuleOauth2ProxyProvider; // @public export const OAUTH2_PROXY_JWT_HEADER = 'X-OAUTH2-PROXY-ID-TOKEN'; diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/src/index.ts b/plugins/auth-backend-module-oauth2-proxy-provider/src/index.ts index db0da00a16..b804f666c7 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/src/index.ts +++ b/plugins/auth-backend-module-oauth2-proxy-provider/src/index.ts @@ -19,7 +19,7 @@ * * @packageDocumentation */ -export { authModuleOauth2ProxyProvider } from './module'; +export { authModuleOauth2ProxyProvider as default } from './module'; export { oauth2ProxyAuthenticator, OAUTH2_PROXY_JWT_HEADER, From 07f8cf0bb75e6c69c1190e914e959a188708a6d8 Mon Sep 17 00:00:00 2001 From: Djam Date: Wed, 29 Nov 2023 16:53:32 +0100 Subject: [PATCH 2/2] Update chilly-lies-collect.md Signed-off-by: Djam --- .changeset/chilly-lies-collect.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/chilly-lies-collect.md b/.changeset/chilly-lies-collect.md index 9af0c41099..c84e6cebd4 100644 --- a/.changeset/chilly-lies-collect.md +++ b/.changeset/chilly-lies-collect.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend-module-oauth2-proxy-provider': patch --- -Exported the plugin as default so it gets discovered by using `featureDiscoveryServiceFactory()` +Exported the provider as default so it gets discovered when using `featureDiscoveryServiceFactory()`