@backstage/plugin-auth-backend 0.0.0-nightly-20221108024703 → 0.0.0-nightly-20221110024817

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,20 +1,36 @@
1
1
  # @backstage/plugin-auth-backend
2
2
 
3
- ## 0.0.0-nightly-20221108024703
3
+ ## 0.0.0-nightly-20221110024817
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 0d6837ca4e: Fix wrong GitHub callback URL documentation
8
8
  - cbe11d1e23: Tweak README
9
9
  - abaed9770e: Improve logging
10
+ - d80833fe0c: Inject optional `CatalogApi` into auth-backend `createRouter` function. This will enable developers to use customized `CatalogApi` when creating the router.
10
11
  - Updated dependencies
11
- - @backstage/backend-common@0.0.0-nightly-20221108024703
12
- - @backstage/catalog-model@0.0.0-nightly-20221108024703
13
- - @backstage/plugin-auth-node@0.0.0-nightly-20221108024703
14
- - @backstage/types@0.0.0-nightly-20221108024703
15
- - @backstage/catalog-client@0.0.0-nightly-20221108024703
16
- - @backstage/config@0.0.0-nightly-20221108024703
17
- - @backstage/errors@0.0.0-nightly-20221108024703
12
+ - @backstage/backend-common@0.0.0-nightly-20221110024817
13
+ - @backstage/catalog-model@0.0.0-nightly-20221110024817
14
+ - @backstage/plugin-auth-node@0.0.0-nightly-20221110024817
15
+ - @backstage/types@0.0.0-nightly-20221110024817
16
+ - @backstage/catalog-client@0.0.0-nightly-20221110024817
17
+ - @backstage/config@0.0.0-nightly-20221110024817
18
+ - @backstage/errors@0.0.0-nightly-20221110024817
19
+
20
+ ## 0.17.1-next.1
21
+
22
+ ### Patch Changes
23
+
24
+ - 0d6837ca4e: Fix wrong GitHub callback URL documentation
25
+ - abaed9770e: Improve logging
26
+ - Updated dependencies
27
+ - @backstage/backend-common@0.16.0-next.1
28
+ - @backstage/plugin-auth-node@0.2.7-next.1
29
+ - @backstage/catalog-client@1.1.2-next.0
30
+ - @backstage/catalog-model@1.1.3-next.0
31
+ - @backstage/config@1.0.4-next.0
32
+ - @backstage/errors@1.1.3-next.0
33
+ - @backstage/types@1.0.1-next.0
18
34
 
19
35
  ## 0.17.1-next.0
20
36
 
package/dist/index.cjs.js CHANGED
@@ -3176,7 +3176,8 @@ async function createRouter(options) {
3176
3176
  database,
3177
3177
  tokenManager,
3178
3178
  tokenFactoryAlgorithm,
3179
- providerFactories
3179
+ providerFactories,
3180
+ catalogApi
3180
3181
  } = options;
3181
3182
  const router = Router__default["default"]();
3182
3183
  const appUrl = config.getString("app.baseUrl");
@@ -3190,7 +3191,6 @@ async function createRouter(options) {
3190
3191
  logger: logger.child({ component: "token-factory" }),
3191
3192
  algorithm: tokenFactoryAlgorithm
3192
3193
  });
3193
- const catalogApi = new catalogClient.CatalogClient({ discoveryApi: discovery });
3194
3194
  const secret = config.getOptionalString("auth.session.secret");
3195
3195
  if (secret) {
3196
3196
  router.use(cookieParser__default["default"](secret));
@@ -3234,7 +3234,7 @@ async function createRouter(options) {
3234
3234
  logger,
3235
3235
  resolverContext: CatalogAuthResolverContext.create({
3236
3236
  logger,
3237
- catalogApi,
3237
+ catalogApi: catalogApi != null ? catalogApi : new catalogClient.CatalogClient({ discoveryApi: discovery }),
3238
3238
  tokenIssuer,
3239
3239
  tokenManager
3240
3240
  })