@owlmeans/web-client 0.1.18-rc.2 → 0.1.18-rc.21

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.
Files changed (107) hide show
  1. package/README.md +16 -13
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/web-client/SKILL.md +70 -11
  4. package/build/components/dispatcher/component.d.ts.map +1 -1
  5. package/build/components/dispatcher/component.js +54 -9
  6. package/build/components/dispatcher/component.js.map +1 -1
  7. package/build/components/dispatcher/parametrise.d.ts.map +1 -1
  8. package/build/components/dispatcher/types.d.ts +2 -2
  9. package/build/components/dispatcher/types.d.ts.map +1 -1
  10. package/build/context.d.ts.map +1 -1
  11. package/build/context.js +2 -1
  12. package/build/context.js.map +1 -1
  13. package/build/entrypoints.d.ts +2 -0
  14. package/build/entrypoints.d.ts.map +1 -0
  15. package/build/entrypoints.js +18 -0
  16. package/build/entrypoints.js.map +1 -0
  17. package/build/errors.d.ts.map +1 -1
  18. package/build/errors.js.map +1 -1
  19. package/build/exports.d.ts +1 -0
  20. package/build/exports.d.ts.map +1 -1
  21. package/build/helper.d.ts.map +1 -1
  22. package/build/i18n/auth-be.json +32 -0
  23. package/build/i18n/auth-de.json +32 -0
  24. package/build/i18n/auth-en.json +32 -0
  25. package/build/i18n/auth-es.json +32 -0
  26. package/build/i18n/auth-pl.json +32 -0
  27. package/build/i18n/auth-ru.json +32 -0
  28. package/build/i18n/auth-uk.json +32 -0
  29. package/build/index.d.ts +2 -1
  30. package/build/index.d.ts.map +1 -1
  31. package/build/index.js +2 -1
  32. package/build/index.js.map +1 -1
  33. package/build/login/consts.d.ts +11 -0
  34. package/build/login/consts.d.ts.map +1 -0
  35. package/build/login/consts.js +11 -0
  36. package/build/login/consts.js.map +1 -0
  37. package/build/login/index.d.ts +8 -0
  38. package/build/login/index.d.ts.map +1 -0
  39. package/build/login/index.js +8 -0
  40. package/build/login/index.js.map +1 -0
  41. package/build/login/pump.d.ts +20 -0
  42. package/build/login/pump.d.ts.map +1 -0
  43. package/build/login/pump.js +46 -0
  44. package/build/login/pump.js.map +1 -0
  45. package/build/login/redirect.d.ts +9 -0
  46. package/build/login/redirect.d.ts.map +1 -0
  47. package/build/login/redirect.js +47 -0
  48. package/build/login/redirect.js.map +1 -0
  49. package/build/login/screen.d.ts +15 -0
  50. package/build/login/screen.d.ts.map +1 -0
  51. package/build/login/screen.js +97 -0
  52. package/build/login/screen.js.map +1 -0
  53. package/build/login/service.d.ts +10 -0
  54. package/build/login/service.d.ts.map +1 -0
  55. package/build/login/service.js +17 -0
  56. package/build/login/service.js.map +1 -0
  57. package/build/login/surrogate.d.ts +21 -0
  58. package/build/login/surrogate.d.ts.map +1 -0
  59. package/build/login/surrogate.js +144 -0
  60. package/build/login/surrogate.js.map +1 -0
  61. package/build/login/view.d.ts +26 -0
  62. package/build/login/view.d.ts.map +1 -0
  63. package/build/login/view.js +73 -0
  64. package/build/login/view.js.map +1 -0
  65. package/build/main.d.ts +9 -1
  66. package/build/main.d.ts.map +1 -1
  67. package/build/main.js +9 -1
  68. package/build/main.js.map +1 -1
  69. package/build/middleware.d.ts.map +1 -1
  70. package/build/middleware.js +7 -6
  71. package/build/middleware.js.map +1 -1
  72. package/build/service.d.ts.map +1 -1
  73. package/build/service.js +1 -1
  74. package/build/service.js.map +1 -1
  75. package/build/types.d.ts +2 -1
  76. package/build/types.d.ts.map +1 -1
  77. package/package.json +17 -17
  78. package/src/components/dispatcher/component.tsx +72 -8
  79. package/src/components/dispatcher/types.ts +2 -2
  80. package/src/context.ts +2 -2
  81. package/src/entrypoints.ts +20 -0
  82. package/src/exports.ts +1 -0
  83. package/src/i18n/auth-be.json +32 -0
  84. package/src/i18n/auth-de.json +32 -0
  85. package/src/i18n/auth-en.json +32 -0
  86. package/src/i18n/auth-es.json +32 -0
  87. package/src/i18n/auth-pl.json +32 -0
  88. package/src/i18n/auth-ru.json +32 -0
  89. package/src/i18n/auth-uk.json +32 -0
  90. package/src/index.ts +2 -1
  91. package/src/login/consts.ts +12 -0
  92. package/src/login/index.ts +7 -0
  93. package/src/login/pump.ts +53 -0
  94. package/src/login/redirect.ts +59 -0
  95. package/src/login/screen.tsx +119 -0
  96. package/src/login/service.ts +19 -0
  97. package/src/login/surrogate.ts +175 -0
  98. package/src/login/view.tsx +94 -0
  99. package/src/main.tsx +11 -2
  100. package/src/middleware.ts +7 -6
  101. package/src/service.ts +1 -1
  102. package/src/types.ts +2 -1
  103. package/build/modules.d.ts +0 -2
  104. package/build/modules.d.ts.map +0 -1
  105. package/build/modules.js +0 -8
  106. package/build/modules.js.map +0 -1
  107. package/src/modules.ts +0 -9
@@ -2,5 +2,37 @@
2
2
  "dispatcher": {
3
3
  "loading": "Загрузка...",
4
4
  "error": "Не удалось выполнить аутентификацию: {{error}}"
5
+ },
6
+ "surrogate": {
7
+ "login": {
8
+ "working": "Выполняем вход…",
9
+ "gesture": {
10
+ "title": "Продолжите, чтобы войти.",
11
+ "action": "Войти"
12
+ },
13
+ "handing": "Готово. Возвращаемся в приложение…",
14
+ "orphaned": "Вход выполнен. Можете закрыть это окно и вернуться в приложение.",
15
+ "failed": "Не удалось завершить. Закройте это окно и попробуйте снова.",
16
+ "standalone": {
17
+ "title": "Эта страница используется для входа из другого окна.",
18
+ "action": "Открыть приложение"
19
+ },
20
+ "close": "Закрыть"
21
+ },
22
+ "logout": {
23
+ "working": "Выполняем выход…",
24
+ "gesture": {
25
+ "title": "Продолжите, чтобы выйти.",
26
+ "action": "Выйти"
27
+ },
28
+ "handing": "Выход выполнен. Возвращаемся в приложение…",
29
+ "orphaned": "Выход выполнен. Можете закрыть это окно.",
30
+ "failed": "Выход здесь не завершён. Можете закрыть это окно.",
31
+ "standalone": {
32
+ "title": "Эта страница используется для выхода из другого окна.",
33
+ "action": "Открыть приложение"
34
+ },
35
+ "close": "Закрыть"
36
+ }
5
37
  }
6
38
  }
@@ -2,5 +2,37 @@
2
2
  "dispatcher": {
3
3
  "loading": "Завантаження...",
4
4
  "error": "Не вдалося пройти автентифікацію: {{error}}"
5
+ },
6
+ "surrogate": {
7
+ "login": {
8
+ "working": "Виконуємо вхід…",
9
+ "gesture": {
10
+ "title": "Продовжте, щоб увійти.",
11
+ "action": "Увійти"
12
+ },
13
+ "handing": "Готово. Повертаємось до застосунку…",
14
+ "orphaned": "Вхід виконано. Можете закрити це вікно й повернутися до застосунку.",
15
+ "failed": "Не вдалося завершити. Закрийте це вікно та спробуйте ще раз.",
16
+ "standalone": {
17
+ "title": "Ця сторінка використовується для входу з іншого вікна.",
18
+ "action": "Відкрити застосунок"
19
+ },
20
+ "close": "Закрити"
21
+ },
22
+ "logout": {
23
+ "working": "Виконуємо вихід…",
24
+ "gesture": {
25
+ "title": "Продовжте, щоб вийти.",
26
+ "action": "Вийти"
27
+ },
28
+ "handing": "Вихід виконано. Повертаємось до застосунку…",
29
+ "orphaned": "Вихід виконано. Можете закрити це вікно.",
30
+ "failed": "Вихід тут не завершено. Можете закрити це вікно.",
31
+ "standalone": {
32
+ "title": "Ця сторінка використовується для виходу з іншого вікна.",
33
+ "action": "Відкрити застосунок"
34
+ },
35
+ "close": "Закрити"
36
+ }
5
37
  }
6
38
  }
package/build/index.d.ts CHANGED
@@ -3,11 +3,12 @@ export * from './types.js';
3
3
  export * from './main.js';
4
4
  export * from './router.js';
5
5
  export * from './components/index.js';
6
- export * from './modules.js';
6
+ export * from './entrypoints.js';
7
7
  export * from './exports.js';
8
8
  export * from './context.js';
9
9
  export * from './helper.js';
10
10
  export * from './i18n.js';
11
11
  export * from './service.js';
12
12
  export * from './errors.js';
13
+ export * from './login/index.js';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
package/build/index.js CHANGED
@@ -3,11 +3,12 @@ export * from './types.js';
3
3
  export * from './main.js';
4
4
  export * from './router.js';
5
5
  export * from './components/index.js';
6
- export * from './modules.js';
6
+ export * from './entrypoints.js';
7
7
  export * from './exports.js';
8
8
  export * from './context.js';
9
9
  export * from './helper.js';
10
10
  export * from './i18n.js';
11
11
  export * from './service.js';
12
12
  export * from './errors.js';
13
+ export * from './login/index.js';
13
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,11 @@
1
+ /** The ordinary flow: leave for the provider and come back. */
2
+ export declare const REDIRECT_LOGIN = "owlmeans-redirect-login";
3
+ /** The flow that runs one window up, for a document that cannot redirect where it is. */
4
+ export declare const SURROGATE_LOGIN = "owlmeans-surrogate-login";
5
+ /**
6
+ * Registered above the default so it wins the cascade wherever it applies. It applies narrowly —
7
+ * only in a frame, or in the surrogate window itself — so the default still serves every
8
+ * ordinary tab.
9
+ */
10
+ export declare const SURROGATE_LOGIN_PRIORITY = 100;
11
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/login/consts.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,eAAO,MAAM,cAAc,4BAA4B,CAAA;AAEvD,yFAAyF;AACzF,eAAO,MAAM,eAAe,6BAA6B,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,MAAM,CAAA"}
@@ -0,0 +1,11 @@
1
+ /** The ordinary flow: leave for the provider and come back. */
2
+ export const REDIRECT_LOGIN = 'owlmeans-redirect-login';
3
+ /** The flow that runs one window up, for a document that cannot redirect where it is. */
4
+ export const SURROGATE_LOGIN = 'owlmeans-surrogate-login';
5
+ /**
6
+ * Registered above the default so it wins the cascade wherever it applies. It applies narrowly —
7
+ * only in a frame, or in the surrogate window itself — so the default still serves every
8
+ * ordinary tab.
9
+ */
10
+ export const SURROGATE_LOGIN_PRIORITY = 100;
11
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/login/consts.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,yBAAyB,CAAA;AAEvD,yFAAyF;AACzF,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAA;AAEzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './consts.js';
2
+ export * from './pump.js';
3
+ export * from './redirect.js';
4
+ export * from './surrogate.js';
5
+ export * from './view.js';
6
+ export * from './screen.js';
7
+ export * from './service.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/login/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './consts.js';
2
+ export * from './pump.js';
3
+ export * from './redirect.js';
4
+ export * from './surrogate.js';
5
+ export * from './view.js';
6
+ export * from './screen.js';
7
+ export * from './service.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/login/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { LoginOutcome } from '@owlmeans/client-auth/login';
2
+ /**
3
+ * Wait on a surrogate window until it says something, or goes away.
4
+ *
5
+ * Extracted so login and logout share one implementation rather than two that agree until one of
6
+ * them is changed. Every guard here was a real failure at some point:
7
+ *
8
+ * - the **origin pin** is not decoration — the message carries a bearer token, and a listener that
9
+ * accepted any origin would take one from any page that could reach this window;
10
+ * - the **`settled` latch** stops a second message, or a close racing a message, resolving twice;
11
+ * - the **`closed` poll** is the only exit when the user simply closes the window, because a window
12
+ * the user closes announces nothing at all;
13
+ * - the listener and the interval are removed on every path, including the ones that resolve.
14
+ */
15
+ export declare const awaitSurrogate: (surrogate: Window, messageType: string, onMessage: (data: {
16
+ type?: string;
17
+ token?: string;
18
+ ok?: boolean;
19
+ }) => Promise<LoginOutcome>) => Promise<LoginOutcome>;
20
+ //# sourceMappingURL=pump.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pump.d.ts","sourceRoot":"","sources":["../../src/login/pump.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAEhF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,GACzB,WAAW,MAAM,EACjB,aAAa,MAAM,EACnB,WAAW,CAAC,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,OAAO,CAAA;CAAE,KAAK,OAAO,CAAC,YAAY,CAAC,KAC1F,OAAO,CAAC,YAAY,CAiCrB,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { LOGIN_WATCH_INTERVAL, LoginOutcome } from '@owlmeans/client-auth/login';
2
+ /**
3
+ * Wait on a surrogate window until it says something, or goes away.
4
+ *
5
+ * Extracted so login and logout share one implementation rather than two that agree until one of
6
+ * them is changed. Every guard here was a real failure at some point:
7
+ *
8
+ * - the **origin pin** is not decoration — the message carries a bearer token, and a listener that
9
+ * accepted any origin would take one from any page that could reach this window;
10
+ * - the **`settled` latch** stops a second message, or a close racing a message, resolving twice;
11
+ * - the **`closed` poll** is the only exit when the user simply closes the window, because a window
12
+ * the user closes announces nothing at all;
13
+ * - the listener and the interval are removed on every path, including the ones that resolve.
14
+ */
15
+ export const awaitSurrogate = async (surrogate, messageType, onMessage) => await new Promise(resolve => {
16
+ let settled = false;
17
+ let watch;
18
+ const finish = (result) => {
19
+ if (settled) {
20
+ return;
21
+ }
22
+ settled = true;
23
+ window.removeEventListener('message', handler);
24
+ if (watch != null) {
25
+ clearInterval(watch);
26
+ }
27
+ resolve(result);
28
+ };
29
+ function handler(event) {
30
+ if (event.origin !== window.location.origin) {
31
+ return;
32
+ }
33
+ const data = event.data;
34
+ if (data?.type !== messageType) {
35
+ return;
36
+ }
37
+ void onMessage(data).then(finish).catch(() => finish(LoginOutcome.Failed));
38
+ }
39
+ window.addEventListener('message', handler);
40
+ watch = setInterval(() => {
41
+ if (surrogate.closed) {
42
+ finish(LoginOutcome.Failed);
43
+ }
44
+ }, LOGIN_WATCH_INTERVAL);
45
+ });
46
+ //# sourceMappingURL=pump.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pump.js","sourceRoot":"","sources":["../../src/login/pump.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAEhF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,SAAiB,EACjB,WAAmB,EACnB,SAA2F,EACpE,EAAE,CAAC,MAAM,IAAI,OAAO,CAAe,OAAO,CAAC,EAAE;IACpE,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,IAAI,KAAiD,CAAA;IAErD,MAAM,MAAM,GAAG,CAAC,MAAoB,EAAQ,EAAE;QAC5C,IAAI,OAAO,EAAE,CAAC;YACZ,OAAM;QACR,CAAC;QACD,OAAO,GAAG,IAAI,CAAA;QACd,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QAC9C,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAClB,aAAa,CAAC,KAAK,CAAC,CAAA;QACtB,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,CAAA;IACjB,CAAC,CAAA;IAED,SAAS,OAAO,CAAC,KAAmB;QAClC,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC5C,OAAM;QACR,CAAC;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,IAA8D,CAAA;QACjF,IAAI,IAAI,EAAE,IAAI,KAAK,WAAW,EAAE,CAAC;YAC/B,OAAM;QACR,CAAC;QACD,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IAC3C,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QACvB,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;YACrB,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC,EAAE,oBAAoB,CAAC,CAAA;AAC1B,CAAC,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { LoginPlugin } from '@owlmeans/client-auth/login';
2
+ /**
3
+ * The ordinary login flow: this document leaves for the identity provider and comes back.
4
+ *
5
+ * The default plugin, matching everything, so any environment that does not need special handling
6
+ * behaves exactly as it always did.
7
+ */
8
+ export declare const makeRedirectLoginPlugin: () => LoginPlugin;
9
+ //# sourceMappingURL=redirect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redirect.d.ts","sourceRoot":"","sources":["../../src/login/redirect.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAG5E;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAO,WAgDzC,CAAA"}
@@ -0,0 +1,47 @@
1
+ import { revokeToken, LoginOutcome } from '@owlmeans/client-auth/login';
2
+ import { REDIRECT_LOGIN } from './consts.js';
3
+ /**
4
+ * The ordinary login flow: this document leaves for the identity provider and comes back.
5
+ *
6
+ * The default plugin, matching everything, so any environment that does not need special handling
7
+ * behaves exactly as it always did.
8
+ */
9
+ export const makeRedirectLoginPlugin = () => ({
10
+ alias: REDIRECT_LOGIN,
11
+ priority: 0,
12
+ mode: 'redirect',
13
+ match: () => true,
14
+ begin: async (_ctx, request) => {
15
+ // Prefer the in-app continuation the caller handed over: a client-side navigation to the
16
+ // dispatcher keeps the app mounted, where a full page load would tear it down and rebuild it.
17
+ if (request.navigate != null) {
18
+ await request.navigate();
19
+ return LoginOutcome.Handled;
20
+ }
21
+ window.location.href = request.url;
22
+ return LoginOutcome.Redirected;
23
+ },
24
+ authorize: async (_ctx, url) => {
25
+ window.location.href = url;
26
+ return LoginOutcome.Redirected;
27
+ },
28
+ // Nothing to hand anywhere — the token was issued in the document that will use it.
29
+ complete: async () => LoginOutcome.Passed,
30
+ // `resume` is deliberately NOT implemented. The host defaults to `Passed`, which is "keep the
31
+ // session you already have and carry on" — byte for byte what an ordinary tab has always done.
32
+ // Implementing it here would be the one way to regress every unframed application.
33
+ logout: (ctx, request) => revokeToken(ctx).then(async () => {
34
+ if (request.navigate != null) {
35
+ await request.navigate();
36
+ return LoginOutcome.Handled;
37
+ }
38
+ // A reload rather than a client-side navigation: `useOwlAuth` and its kin read through
39
+ // cached values, so the honest way to make a whole application forget a session is to
40
+ // rebuild it. This is what `useLogout` did inline before the mechanic became a plugin.
41
+ window.location.reload();
42
+ return LoginOutcome.Handled;
43
+ }),
44
+ // Nothing to tell anyone — the session was cleared in the document that owned it.
45
+ logoutComplete: async () => LoginOutcome.Passed,
46
+ });
47
+ //# sourceMappingURL=redirect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../src/login/redirect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAgB,EAAE,CAAC,CAAC;IACzD,KAAK,EAAE,cAAc;IACrB,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;IAEjB,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,yFAAyF;QACzF,8FAA8F;QAC9F,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;YAC7B,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;YAExB,OAAO,YAAY,CAAC,OAAO,CAAA;QAC7B,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAA;QAElC,OAAO,YAAY,CAAC,UAAU,CAAA;IAChC,CAAC;IAED,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAC7B,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAA;QAE1B,OAAO,YAAY,CAAC,UAAU,CAAA;IAChC,CAAC;IAED,oFAAoF;IACpF,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM;IAEzC,8FAA8F;IAC9F,+FAA+F;IAC/F,mFAAmF;IAEnF,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,GAAmB,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;QACzE,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC;YAC7B,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;YAExB,OAAO,YAAY,CAAC,OAAO,CAAA;QAC7B,CAAC;QACD,uFAAuF;QACvF,sFAAsF;QACtF,uFAAuF;QACvF,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;QAExB,OAAO,YAAY,CAAC,OAAO,CAAA;IAC7B,CAAC,CAAC;IAEF,kFAAkF;IAClF,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM;CAChD,CAAC,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { FC } from 'react';
2
+ /**
3
+ * The login window an embedded application opens one level up.
4
+ *
5
+ * It is NOT wrapped in `DispatcherHOC`, and that is the point: the HOC's continuation navigates to
6
+ * `HOME` when it has nothing else to do, which is how a popup ended up rendering the whole
7
+ * application, with its navigation, inside itself. This screen has no continuation at all — it
8
+ * either hands something back and closes, or it says what it is waiting for.
9
+ *
10
+ * It also never runs the authorization machine. When there is already a session here, that is the
11
+ * answer, and it goes back to the opener immediately — no provider round trip, no PKCE exchange.
12
+ * When there is not, it forwards to the dispatcher (`next`), which owns that flow.
13
+ */
14
+ export declare const SurrogateScreen: FC;
15
+ //# sourceMappingURL=screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../src/login/screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAU/B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,EA+F7B,CAAA"}
@@ -0,0 +1,97 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ import { useContext } from '@owlmeans/client';
4
+ import { useI18nLib } from '@owlmeans/client-i18n';
5
+ import { LoginIntent, LoginOutcome, LOGIN_INTENT_QUERY, LOGIN_METHOD_QUERY, LOGIN_NEXT_QUERY, } from '@owlmeans/client-auth/login';
6
+ import { LoginSurrogateView, SurrogateStage } from './view.js';
7
+ /**
8
+ * The login window an embedded application opens one level up.
9
+ *
10
+ * It is NOT wrapped in `DispatcherHOC`, and that is the point: the HOC's continuation navigates to
11
+ * `HOME` when it has nothing else to do, which is how a popup ended up rendering the whole
12
+ * application, with its navigation, inside itself. This screen has no continuation at all — it
13
+ * either hands something back and closes, or it says what it is waiting for.
14
+ *
15
+ * It also never runs the authorization machine. When there is already a session here, that is the
16
+ * answer, and it goes back to the opener immediately — no provider round trip, no PKCE exchange.
17
+ * When there is not, it forwards to the dispatcher (`next`), which owns that flow.
18
+ */
19
+ export const SurrogateScreen = () => {
20
+ const context = useContext();
21
+ const [query] = context.router().useSearchParams();
22
+ const t = useI18nLib('auth');
23
+ const intent = query.get(LOGIN_INTENT_QUERY) === LoginIntent.Logout
24
+ ? LoginIntent.Logout
25
+ : LoginIntent.Login;
26
+ const [stage, setStage] = useState(SurrogateStage.Working);
27
+ const [error, setError] = useState();
28
+ const onAction = useCallback(() => {
29
+ if (stage === SurrogateStage.Standalone) {
30
+ window.location.href = '/';
31
+ return;
32
+ }
33
+ if (stage === SurrogateStage.Gesture) {
34
+ const next = query.get(LOGIN_NEXT_QUERY);
35
+ void context.login().begin({ url: next ?? window.location.href });
36
+ return;
37
+ }
38
+ window.close();
39
+ }, [context, stage, query]);
40
+ useEffect(() => {
41
+ const login = context.service('login-service');
42
+ // First statement, unconditionally: `markSurrogate` reads `window.name`, and the browser
43
+ // clears that the moment this window's top-level context goes cross-origin. Recording it
44
+ // later means recording nothing.
45
+ login.enter();
46
+ const env = login.env();
47
+ if (!env.surrogate) {
48
+ // Somebody opened this address directly, or the window lost its marker. Never navigate on
49
+ // its behalf — offer a link and stop.
50
+ setStage(env.embedded ? SurrogateStage.Gesture : SurrogateStage.Standalone);
51
+ return;
52
+ }
53
+ const run = async () => {
54
+ const token = await context.auth().authenticated();
55
+ if (intent === LoginIntent.Logout) {
56
+ // Revoked FIRST, before anything can be awaited on a channel that may never answer: a
57
+ // window the user closes half a second later must still have ended the session it opened
58
+ // to end.
59
+ await login.revoke();
60
+ const outcome = await login.logoutComplete();
61
+ setStage(outcome === LoginOutcome.Handled ? SurrogateStage.Handing
62
+ : outcome === LoginOutcome.Orphaned ? SurrogateStage.Orphaned
63
+ : SurrogateStage.Failed);
64
+ return;
65
+ }
66
+ if (token != null && token !== '') {
67
+ // Already signed in here. The framed application is the one that asked, so the session
68
+ // goes to it rather than being displayed to this window.
69
+ const outcome = await login.resume(token);
70
+ setStage(outcome === LoginOutcome.Handled ? SurrogateStage.Handing
71
+ : outcome === LoginOutcome.Orphaned ? SurrogateStage.Orphaned
72
+ : SurrogateStage.Failed);
73
+ return;
74
+ }
75
+ // Nothing here yet — the dispatcher owns the authorization round trip, and the provider's
76
+ // callback lands there rather than on this route. The method the user already chose travels
77
+ // with it, so the dispatcher does not ask a second time in a window with no one to ask.
78
+ const next = query.get(LOGIN_NEXT_QUERY);
79
+ if (next == null || next === '') {
80
+ setStage(SurrogateStage.Gesture);
81
+ return;
82
+ }
83
+ const method = query.get(LOGIN_METHOD_QUERY);
84
+ const target = method != null && method !== ''
85
+ ? `${next}${next.includes('?') ? '&' : '?'}${LOGIN_METHOD_QUERY}=${encodeURIComponent(method)}`
86
+ : next;
87
+ window.location.href = target;
88
+ };
89
+ void run().catch((e) => {
90
+ console.error(e);
91
+ setError(e.message);
92
+ setStage(SurrogateStage.Failed);
93
+ });
94
+ }, [context, intent]);
95
+ return _jsx(LoginSurrogateView, { stage: stage, intent: intent, onAction: onAction, error: error, translate: (key, defaultValue) => t(key, { defaultValue }) });
96
+ };
97
+ //# sourceMappingURL=screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screen.js","sourceRoot":"","sources":["../../src/login/screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;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C,CAAA;YACnB,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;QACjC,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAErB,OAAO,KAAC,kBAAkB,IACxB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAC9D,SAAS,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,CAAC,GAC1D,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { BasicConfig, BasicContext } from '@owlmeans/context';
2
+ /**
3
+ * Register the login host and the two browser flows on a context.
4
+ *
5
+ * Called by `makeContext`, so every web app has working login — including a framed one — without
6
+ * registering anything. An app that needs a different mechanic registers its own plugin at a
7
+ * higher priority; it does not replace this.
8
+ */
9
+ export declare const appendWebLogin: <C extends BasicConfig, T extends BasicContext<C>>(ctx: T) => T;
10
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/login/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIlE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAG,CAMzF,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { appendLogin } from '@owlmeans/client-auth/login';
2
+ import { makeRedirectLoginPlugin } from './redirect.js';
3
+ import { makeSurrogateLoginPlugin } from './surrogate.js';
4
+ /**
5
+ * Register the login host and the two browser flows on a context.
6
+ *
7
+ * Called by `makeContext`, so every web app has working login — including a framed one — without
8
+ * registering anything. An app that needs a different mechanic registers its own plugin at a
9
+ * higher priority; it does not replace this.
10
+ */
11
+ export const appendWebLogin = (ctx) => {
12
+ const service = appendLogin(ctx).login();
13
+ service.registerPlugin(makeRedirectLoginPlugin());
14
+ service.registerPlugin(makeSurrogateLoginPlugin());
15
+ return ctx;
16
+ };
17
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/login/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAEzD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAmD,GAAM,EAAK,EAAE;IAC5F,MAAM,OAAO,GAAG,WAAW,CAAO,GAAG,CAAC,CAAC,KAAK,EAAE,CAAA;IAC9C,OAAO,CAAC,cAAc,CAAC,uBAAuB,EAAE,CAAC,CAAA;IACjD,OAAO,CAAC,cAAc,CAAC,wBAAwB,EAAE,CAAC,CAAA;IAElD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { LoginPlugin } from '@owlmeans/client-auth/login';
2
+ /**
3
+ * Login for a document that cannot complete the flow where it is.
4
+ *
5
+ * An app embedded in a frame cannot redirect to an identity provider: the provider refuses to be
6
+ * embedded (`frame-ancestors`), and its session cookies are third-party there. So the flow runs
7
+ * one window up, in a surrogate window that is top-level and first-party on this application's own
8
+ * origin — where the very same flow completes normally — and the token is passed back to the
9
+ * document that asked for it.
10
+ *
11
+ * This plugin is deliberately not OIDC-specific. The mechanic is "run the login route one window
12
+ * up and hand the token back", and the adoption is the plain auth service, so any relying party
13
+ * that renders a login route gets it by registering nothing.
14
+ *
15
+ * `match` covers BOTH halves of the lifecycle — the framed opener and the surrogate itself, where
16
+ * `embedded` is false. Inside the surrogate the redirect plugin must not win: that window IS
17
+ * top-level, so it authorizes by an ordinary redirect and differs only in what it does with the
18
+ * token at the end.
19
+ */
20
+ export declare const makeSurrogateLoginPlugin: () => LoginPlugin;
21
+ //# sourceMappingURL=surrogate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surrogate.d.ts","sourceRoot":"","sources":["../../src/login/surrogate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA0B,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAItF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,QAAO,WAoJ3C,CAAA"}