@backstage/plugin-auth-backend 0.16.0-next.3 → 0.16.0

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,5 +1,31 @@
1
1
  # @backstage/plugin-auth-backend
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2fc41ebf07: Removed the previously deprecated class `AtlassianAuthProvider`. Please use `providers.atlassian.create(...)` instead.
8
+ - a291688bc5: Renamed the `RedirectInfo` type to `OAuthStartResponse`
9
+ - 8600855fbf: The auth0 integration is updated to use the `passport-auth0` library. The configuration under `auth.providers.auth0.\*` now supports an optional `audience` parameter; providing that allows you to connect to the correct API to get permissions, access tokens, and full profile information.
10
+
11
+ [What is an Audience](https://community.auth0.com/t/what-is-the-audience/71414)
12
+
13
+ ### Patch Changes
14
+
15
+ - 5b011fb2e6: Allow adding misc claims to JWT
16
+ - d669d89206: Minor API signatures cleanup
17
+ - 667d917488: Updated dependency `msw` to `^0.47.0`.
18
+ - 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`.
19
+ - bf5e9030eb: Updated dependency `msw` to `^0.45.0`.
20
+ - e1ebaeb332: Cloudflare Access Provider: Add JWT to CloudflareAccessResult
21
+ - Updated dependencies
22
+ - @backstage/backend-common@0.15.1
23
+ - @backstage/plugin-auth-node@0.2.5
24
+ - @backstage/catalog-client@1.1.0
25
+ - @backstage/catalog-model@1.1.1
26
+ - @backstage/config@1.0.2
27
+ - @backstage/errors@1.1.1
28
+
3
29
  ## 0.16.0-next.3
4
30
 
5
31
  ### Minor Changes
package/dist/index.cjs.js CHANGED
@@ -2724,8 +2724,7 @@ class TokenFactory {
2724
2724
  async issueToken(params) {
2725
2725
  const key = await this.getKey();
2726
2726
  const iss = this.issuer;
2727
- const sub = params.claims.sub;
2728
- const ent = params.claims.ent;
2727
+ const { sub, ent, ...additionalClaims } = params.claims;
2729
2728
  const aud = "backstage";
2730
2729
  const iat = Math.floor(Date.now() / MS_IN_S);
2731
2730
  const exp = iat + this.keyDurationSeconds;
@@ -2740,7 +2739,7 @@ class TokenFactory {
2740
2739
  if (!key.alg) {
2741
2740
  throw new errors.AuthenticationError("No algorithm was provided in the key");
2742
2741
  }
2743
- return new jose.SignJWT({ iss, sub, ent, aud, iat, exp }).setProtectedHeader({ alg: key.alg, kid: key.kid }).setIssuer(iss).setAudience(aud).setSubject(sub).setIssuedAt(iat).setExpirationTime(exp).sign(await jose.importJWK(key));
2742
+ return new jose.SignJWT({ ...additionalClaims, iss, sub, ent, aud, iat, exp }).setProtectedHeader({ alg: key.alg, kid: key.kid }).setIssuer(iss).setAudience(aud).setSubject(sub).setIssuedAt(iat).setExpirationTime(exp).sign(await jose.importJWK(key));
2744
2743
  }
2745
2744
  async listPublicKeys() {
2746
2745
  const { items: keys } = await this.keyStore.listKeys();