@backstage/plugin-auth-backend 0.0.0-nightly-20220425024022 → 0.0.0-nightly-20220428025925
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 +36 -4
- package/dist/index.cjs.js +14 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,50 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20220428025925
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- cfc0f19699: Updated dependency `fs-extra` to `10.1.0`.
|
|
8
|
+
- 787ae0d541: Add more common predefined sign-in resolvers to auth providers.
|
|
9
|
+
|
|
10
|
+
Add the existing resolver to more providers (already available at `google`):
|
|
11
|
+
|
|
12
|
+
- `providers.microsoft.resolvers.emailLocalPartMatchingUserEntityName()`
|
|
13
|
+
- `providers.okta.resolvers.emailLocalPartMatchingUserEntityName()`
|
|
14
|
+
|
|
15
|
+
Add a new resolver for simple email-to-email matching:
|
|
16
|
+
|
|
17
|
+
- `providers.google.resolvers.emailMatchingUserEntityProfileEmail()`
|
|
18
|
+
- `providers.microsoft.resolvers.emailMatchingUserEntityProfileEmail()`
|
|
19
|
+
- `providers.okta.resolvers.emailMatchingUserEntityProfileEmail()`
|
|
20
|
+
|
|
21
|
+
- 9ec4e0613e: Update to `jose` 4.6.0
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @backstage/backend-common@0.0.0-nightly-20220428025925
|
|
24
|
+
- @backstage/plugin-auth-node@0.0.0-nightly-20220428025925
|
|
25
|
+
|
|
26
|
+
## 0.13.1-next.0
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- cfc0f19699: Updated dependency `fs-extra` to `10.1.0`.
|
|
31
|
+
- 787ae0d541: Add more common predefined sign-in resolvers to auth providers.
|
|
32
|
+
|
|
33
|
+
Add the existing resolver to more providers (already available at `google`):
|
|
8
34
|
|
|
9
35
|
- `providers.microsoft.resolvers.emailLocalPartMatchingUserEntityName()`
|
|
10
36
|
- `providers.okta.resolvers.emailLocalPartMatchingUserEntityName()`
|
|
11
37
|
|
|
38
|
+
Add a new resolver for simple email-to-email matching:
|
|
39
|
+
|
|
40
|
+
- `providers.google.resolvers.emailMatchingUserEntityProfileEmail()`
|
|
41
|
+
- `providers.microsoft.resolvers.emailMatchingUserEntityProfileEmail()`
|
|
42
|
+
- `providers.okta.resolvers.emailMatchingUserEntityProfileEmail()`
|
|
43
|
+
|
|
12
44
|
- 9ec4e0613e: Update to `jose` 4.6.0
|
|
13
45
|
- Updated dependencies
|
|
14
|
-
- @backstage/backend-common@0.
|
|
15
|
-
- @backstage/plugin-auth-node@0.
|
|
46
|
+
- @backstage/backend-common@0.13.3-next.0
|
|
47
|
+
- @backstage/plugin-auth-node@0.2.1-next.0
|
|
16
48
|
|
|
17
49
|
## 0.13.0
|
|
18
50
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -1255,6 +1255,17 @@ const commonByEmailLocalPartResolver = async (info, ctx) => {
|
|
|
1255
1255
|
entityRef: { name: localPart }
|
|
1256
1256
|
});
|
|
1257
1257
|
};
|
|
1258
|
+
const commonByEmailResolver = async (info, ctx) => {
|
|
1259
|
+
const { profile } = info;
|
|
1260
|
+
if (!profile.email) {
|
|
1261
|
+
throw new Error("Login failed, user profile does not contain an email");
|
|
1262
|
+
}
|
|
1263
|
+
return ctx.signInWithCatalogUser({
|
|
1264
|
+
filter: {
|
|
1265
|
+
"spec.profile.email": profile.email
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
};
|
|
1258
1269
|
|
|
1259
1270
|
class GoogleAuthProvider {
|
|
1260
1271
|
constructor(options) {
|
|
@@ -1352,6 +1363,7 @@ const google = createAuthProviderIntegration({
|
|
|
1352
1363
|
},
|
|
1353
1364
|
resolvers: {
|
|
1354
1365
|
emailLocalPartMatchingUserEntityName: () => commonByEmailLocalPartResolver,
|
|
1366
|
+
emailMatchingUserEntityProfileEmail: () => commonByEmailResolver,
|
|
1355
1367
|
emailMatchingUserEntityAnnotation() {
|
|
1356
1368
|
return async (info, ctx) => {
|
|
1357
1369
|
const { profile } = info;
|
|
@@ -1482,6 +1494,7 @@ const microsoft = createAuthProviderIntegration({
|
|
|
1482
1494
|
},
|
|
1483
1495
|
resolvers: {
|
|
1484
1496
|
emailLocalPartMatchingUserEntityName: () => commonByEmailLocalPartResolver,
|
|
1497
|
+
emailMatchingUserEntityProfileEmail: () => commonByEmailResolver,
|
|
1485
1498
|
emailMatchingUserEntityAnnotation() {
|
|
1486
1499
|
return async (info, ctx) => {
|
|
1487
1500
|
const { profile } = info;
|
|
@@ -1919,6 +1932,7 @@ const okta = createAuthProviderIntegration({
|
|
|
1919
1932
|
},
|
|
1920
1933
|
resolvers: {
|
|
1921
1934
|
emailLocalPartMatchingUserEntityName: () => commonByEmailLocalPartResolver,
|
|
1935
|
+
emailMatchingUserEntityProfileEmail: () => commonByEmailResolver,
|
|
1922
1936
|
emailMatchingUserEntityAnnotation() {
|
|
1923
1937
|
return async (info, ctx) => {
|
|
1924
1938
|
const { profile } = info;
|