@backstage/plugin-auth-backend 0.0.0-nightly-202111922557 → 0.0.0-nightly-2021111822616

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,6 +1,26 @@
1
1
  # @backstage/plugin-auth-backend
2
2
 
3
- ## 0.0.0-nightly-202111922557
3
+ ## 0.0.0-nightly-2021111822616
4
+
5
+ ### Patch Changes
6
+
7
+ - 24a67e3e2e: Fixed the fallback identity population to correctly generate an entity reference for `userEntityRef` if no token is provided.
8
+ - Updated dependencies
9
+ - @backstage/backend-common@0.0.0-nightly-2021111822616
10
+ - @backstage/catalog-client@0.0.0-nightly-2021111822616
11
+ - @backstage/test-utils@0.0.0-nightly-2021111822616
12
+ - @backstage/config@0.0.0-nightly-2021111822616
13
+
14
+ ## 0.5.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 699c2e9ddc: export minimal typescript types for OIDC provider
19
+ - Updated dependencies
20
+ - @backstage/backend-common@0.9.14
21
+ - @backstage/catalog-model@0.9.8
22
+
23
+ ## 0.5.0
4
24
 
5
25
  ### Minor Changes
6
26
 
@@ -18,8 +38,8 @@
18
38
  This might break some stricter OAuth2 implementations so there is now a `includeBasicAuth` config option that can manually be set to `true` to enable this behavior.
19
39
  - dcd1a0c3f4: Minor improvement to the API reports, by not unpacking arguments directly
20
40
  - Updated dependencies
21
- - @backstage/test-utils@0.0.0-nightly-202111922557
22
- - @backstage/backend-common@0.0.0-nightly-202111922557
41
+ - @backstage/test-utils@0.1.24
42
+ - @backstage/backend-common@0.9.13
23
43
 
24
44
  ## 0.4.10
25
45
 
package/dist/index.cjs.js CHANGED
@@ -479,8 +479,12 @@ class OAuthAdapter {
479
479
  if (identity.token) {
480
480
  return prepareBackstageIdentityResponse(identity);
481
481
  }
482
+ const userEntityRef = catalogModel.stringifyEntityRef(catalogModel.parseEntityRef(identity.id, {
483
+ defaultKind: "user",
484
+ defaultNamespace: catalogModel.ENTITY_DEFAULT_NAMESPACE
485
+ }));
482
486
  const token = await this.options.tokenIssuer.issueToken({
483
- claims: { sub: identity.id }
487
+ claims: { sub: userEntityRef }
484
488
  });
485
489
  return prepareBackstageIdentityResponse({ ...identity, token });
486
490
  }