@sudoplatform/sudo-user 17.1.1 → 17.2.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/cjs/user/error.js +10 -1
- package/cjs/user/user-client.js +48 -32
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +1 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +4 -4
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +18 -3
- package/docs/classes/AlreadyRegisteredError.html +148 -8
- package/docs/classes/AlreadySignedInError.html +173 -0
- package/docs/classes/DefaultSudoUserClient.html +543 -57
- package/docs/classes/IdentityServiceConfigNotFoundError.html +148 -8
- package/docs/classes/LocalAuthenticationProvider.html +123 -12
- package/docs/classes/SignInGuard.html +107 -8
- package/docs/classes/TESTAuthenticationProvider.html +138 -12
- package/docs/classes/internal.AmplifyClient.html +148 -13
- package/docs/enums/GraphQLClientAuthMode.html +64 -2
- package/docs/functions/internal.getIdentityServiceConfig.html +39 -1
- package/docs/hierarchy.html +42 -1
- package/docs/index.html +37 -2
- package/docs/interfaces/AuthenticationProvider.html +78 -5
- package/docs/interfaces/AuthenticationTokens.html +86 -7
- package/docs/interfaces/GraphQLClient.html +123 -12
- package/docs/interfaces/GraphQLClientOptions.html +92 -8
- package/docs/interfaces/SudoPlatformSignInCallback.html +68 -5
- package/docs/interfaces/SudoUserClient.html +431 -52
- package/docs/interfaces/internal.SudoUserOptions.html +91 -2
- package/docs/modules/internal.html +53 -1
- package/docs/modules.html +52 -1
- package/docs/types/IAMCredentials.html +65 -2
- package/docs/types/TokenProvider.html +33 -1
- package/docs/types/internal.Config.html +35 -1
- package/docs/types/internal.FederatedSignInConfig.html +34 -1
- package/docs/types/internal.IdentityServiceConfig.html +34 -1
- package/docs/variables/internal.Config.html +35 -1
- package/docs/variables/internal.FederatedSignInConfigCodec.html +34 -1
- package/docs/variables/internal.IdentityServiceConfigCodec.html +34 -1
- package/lib/user/error.js +8 -0
- package/lib/user/user-client.js +49 -33
- package/package.json +36 -60
- package/types/user/error.d.ts +6 -0
- package/types/user/user-client-interface.d.ts +12 -0
- package/types/user/user-client.d.ts +1 -0
|
@@ -1 +1,34 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IdentityServiceConfig | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IdentityServiceConfig | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@sudoplatform/sudo-user</a>
|
|
3
|
+
<div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
|
|
4
|
+
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
|
+
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
6
|
+
<div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
|
|
7
|
+
<div class="container container-main">
|
|
8
|
+
<div class="col-content">
|
|
9
|
+
<div class="tsd-page-title">
|
|
10
|
+
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
|
+
<li><a href="../modules/internal.html">internal</a></li>
|
|
12
|
+
<li><a href="" aria-current="page">IdentityServiceConfig</a></li></ul>
|
|
13
|
+
<h1>Type Alias IdentityServiceConfig</h1></div>
|
|
14
|
+
<div class="tsd-signature"><span class="tsd-kind-type-alias">IdentityServiceConfig</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">t.TypeOf</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-keyword">typeof</span> <a href="../variables/internal.IdentityServiceConfigCodec.html" class="tsd-signature-type tsd-kind-variable">IdentityServiceConfigCodec</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
|
15
|
+
<ul>
|
|
16
|
+
<li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/e9ea129dc5195b2e28a6cfc8cb56acd7a815b9e6/src/core/sdk-config.ts#L66">src/core/sdk-config.ts:66</a></li></ul></aside></div>
|
|
17
|
+
<div class="col-sidebar">
|
|
18
|
+
<div class="page-menu">
|
|
19
|
+
<div class="tsd-navigation settings">
|
|
20
|
+
<details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
21
|
+
<h3>Settings</h3></summary>
|
|
22
|
+
<div class="tsd-accordion-details">
|
|
23
|
+
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
|
|
24
|
+
<ul id="tsd-filter-options">
|
|
25
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
26
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
27
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div>
|
|
28
|
+
<div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
|
29
|
+
<div class="site-menu">
|
|
30
|
+
<nav class="tsd-navigation"><a href="../modules.html">@sudoplatform/sudo-user</a>
|
|
31
|
+
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
32
|
+
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
33
|
+
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
34
|
+
<div class="overlay"></div></body></html>
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Config | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@sudoplatform/sudo-user</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/internal.html">internal</a></li><li><a href="" aria-current="page">Config</a></li></ul><h1>Variable Config<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">Config</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">identityService</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">apiUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">clientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">identityPoolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">poolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">region</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">registrationMethods</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ArrayC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">transientBucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">federatedSignIn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">appClientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signInRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signOutRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">webDomain</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">identityProvider</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/3f04a0c9cce7c1b8aa789c6bc8b5e460ad67c502/src/core/sdk-config.ts#L54">src/core/sdk-config.ts:54</a></li><li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/3f04a0c9cce7c1b8aa789c6bc8b5e460ad67c502/src/core/sdk-config.ts#L65">src/core/sdk-config.ts:65</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@sudoplatform/sudo-user</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Config | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@sudoplatform/sudo-user</a>
|
|
3
|
+
<div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
|
|
4
|
+
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
|
+
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
6
|
+
<div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
|
|
7
|
+
<div class="container container-main">
|
|
8
|
+
<div class="col-content">
|
|
9
|
+
<div class="tsd-page-title">
|
|
10
|
+
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
|
+
<li><a href="../modules/internal.html">internal</a></li>
|
|
12
|
+
<li><a href="" aria-current="page">Config</a></li></ul>
|
|
13
|
+
<h1>Variable Config<code class="tsd-tag">Const</code></h1></div>
|
|
14
|
+
<div class="tsd-signature"><span class="tsd-kind-variable">Config</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">identityService</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">apiUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">clientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">identityPoolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">poolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">region</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">registrationMethods</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ArrayC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">transientBucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">federatedSignIn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">appClientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signInRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signOutRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">webDomain</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">identityProvider</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
15
|
+
<ul>
|
|
16
|
+
<li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/e9ea129dc5195b2e28a6cfc8cb56acd7a815b9e6/src/core/sdk-config.ts#L54">src/core/sdk-config.ts:54</a></li>
|
|
17
|
+
<li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/e9ea129dc5195b2e28a6cfc8cb56acd7a815b9e6/src/core/sdk-config.ts#L65">src/core/sdk-config.ts:65</a></li></ul></aside></div>
|
|
18
|
+
<div class="col-sidebar">
|
|
19
|
+
<div class="page-menu">
|
|
20
|
+
<div class="tsd-navigation settings">
|
|
21
|
+
<details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
22
|
+
<h3>Settings</h3></summary>
|
|
23
|
+
<div class="tsd-accordion-details">
|
|
24
|
+
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
|
|
25
|
+
<ul id="tsd-filter-options">
|
|
26
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
27
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
28
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div>
|
|
29
|
+
<div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
|
30
|
+
<div class="site-menu">
|
|
31
|
+
<nav class="tsd-navigation"><a href="../modules.html">@sudoplatform/sudo-user</a>
|
|
32
|
+
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
33
|
+
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
34
|
+
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
35
|
+
<div class="overlay"></div></body></html>
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FederatedSignInConfigCodec | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FederatedSignInConfigCodec | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@sudoplatform/sudo-user</a>
|
|
3
|
+
<div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
|
|
4
|
+
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
|
+
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
6
|
+
<div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
|
|
7
|
+
<div class="container container-main">
|
|
8
|
+
<div class="col-content">
|
|
9
|
+
<div class="tsd-page-title">
|
|
10
|
+
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
|
+
<li><a href="../modules/internal.html">internal</a></li>
|
|
12
|
+
<li><a href="" aria-current="page">FederatedSignInConfigCodec</a></li></ul>
|
|
13
|
+
<h1>Variable FederatedSignInConfigCodec<code class="tsd-tag">Const</code></h1></div>
|
|
14
|
+
<div class="tsd-signature"><span class="tsd-kind-variable">FederatedSignInConfigCodec</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">appClientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signInRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">signOutRedirectUri</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">webDomain</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">identityProvider</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
15
|
+
<ul>
|
|
16
|
+
<li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/e9ea129dc5195b2e28a6cfc8cb56acd7a815b9e6/src/core/sdk-config.ts#L35">src/core/sdk-config.ts:35</a></li></ul></aside></div>
|
|
17
|
+
<div class="col-sidebar">
|
|
18
|
+
<div class="page-menu">
|
|
19
|
+
<div class="tsd-navigation settings">
|
|
20
|
+
<details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
21
|
+
<h3>Settings</h3></summary>
|
|
22
|
+
<div class="tsd-accordion-details">
|
|
23
|
+
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
|
|
24
|
+
<ul id="tsd-filter-options">
|
|
25
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
26
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
27
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div>
|
|
28
|
+
<div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
|
29
|
+
<div class="site-menu">
|
|
30
|
+
<nav class="tsd-navigation"><a href="../modules.html">@sudoplatform/sudo-user</a>
|
|
31
|
+
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
32
|
+
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
33
|
+
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
34
|
+
<div class="overlay"></div></body></html>
|
|
@@ -1 +1,34 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IdentityServiceConfigCodec | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IdentityServiceConfigCodec | @sudoplatform/sudo-user</title><meta name="description" content="Documentation for @sudoplatform/sudo-user"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@sudoplatform/sudo-user</a>
|
|
3
|
+
<div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/>
|
|
4
|
+
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
|
+
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
6
|
+
<div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header>
|
|
7
|
+
<div class="container container-main">
|
|
8
|
+
<div class="col-content">
|
|
9
|
+
<div class="tsd-page-title">
|
|
10
|
+
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
|
+
<li><a href="../modules/internal.html">internal</a></li>
|
|
12
|
+
<li><a href="" aria-current="page">IdentityServiceConfigCodec</a></li></ul>
|
|
13
|
+
<h1>Variable IdentityServiceConfigCodec<code class="tsd-tag">Const</code></h1></div>
|
|
14
|
+
<div class="tsd-signature"><span class="tsd-kind-variable">IdentityServiceConfigCodec</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IntersectionC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">[</span><br/> <span class="tsd-signature-type">TypeC</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">apiUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">bucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">clientId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">identityPoolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">poolId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">region</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">registrationMethods</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ArrayC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">transientBucket</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">StringC</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">PartialC</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">refreshTokenLifetime</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">NumberC</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
15
|
+
<ul>
|
|
16
|
+
<li>Defined in <a href="https://github.com/sudoplatform/sudo-user-js/blob/e9ea129dc5195b2e28a6cfc8cb56acd7a815b9e6/src/core/sdk-config.ts#L12">src/core/sdk-config.ts:12</a></li></ul></aside></div>
|
|
17
|
+
<div class="col-sidebar">
|
|
18
|
+
<div class="page-menu">
|
|
19
|
+
<div class="tsd-navigation settings">
|
|
20
|
+
<details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
|
|
21
|
+
<h3>Settings</h3></summary>
|
|
22
|
+
<div class="tsd-accordion-details">
|
|
23
|
+
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
|
|
24
|
+
<ul id="tsd-filter-options">
|
|
25
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
26
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
27
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div>
|
|
28
|
+
<div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
|
29
|
+
<div class="site-menu">
|
|
30
|
+
<nav class="tsd-navigation"><a href="../modules.html">@sudoplatform/sudo-user</a>
|
|
31
|
+
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
32
|
+
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
33
|
+
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
34
|
+
<div class="overlay"></div></body></html>
|
package/lib/user/error.js
CHANGED
|
@@ -20,6 +20,14 @@ export class AlreadyRegisteredError extends UserError {
|
|
|
20
20
|
super('User is already registered.');
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Indicates the user associated with the client is already signed in.
|
|
25
|
+
*/
|
|
26
|
+
export class AlreadySignedInError extends UserError {
|
|
27
|
+
constructor() {
|
|
28
|
+
super('User is already signed in.');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
23
31
|
/**
|
|
24
32
|
* Indicates the configuration related to Identity Service is not found. This may indicate that Identity Service
|
|
25
33
|
* is not deployed into your runtime instance or the config file that
|
package/lib/user/user-client.js
CHANGED
|
@@ -12,7 +12,7 @@ import { AuthenticationStore } from '../core/auth-store';
|
|
|
12
12
|
import { DefaultKeyManager } from '../core/key-manager';
|
|
13
13
|
import { getIdentityServiceConfig } from '../core/sdk-config';
|
|
14
14
|
import { CognitoAuthUI } from './auth';
|
|
15
|
-
import { AlreadyRegisteredError } from './error';
|
|
15
|
+
import { AlreadyRegisteredError, AlreadySignedInError } from './error';
|
|
16
16
|
import { CognitoUserPoolIdentityProvider, } from './identity-provider';
|
|
17
17
|
import { userKeyNames } from './user-key-names';
|
|
18
18
|
import { jwt } from '../utils/jwt';
|
|
@@ -110,6 +110,17 @@ export class DefaultSudoUserClient {
|
|
|
110
110
|
await this.keyManager.removeItem(userKeyNames.userId);
|
|
111
111
|
await this.keyManager.addString(userKeyNames.userId, name);
|
|
112
112
|
}
|
|
113
|
+
async signInViaAssumption(username, idToken) {
|
|
114
|
+
if (await this.isSignedIn()) {
|
|
115
|
+
throw new AlreadySignedInError();
|
|
116
|
+
}
|
|
117
|
+
await this.storeTokens(username, {
|
|
118
|
+
idToken,
|
|
119
|
+
accessToken: '',
|
|
120
|
+
refreshToken: '',
|
|
121
|
+
tokenExpiry: 0,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
113
124
|
async getUserClaim(name) {
|
|
114
125
|
const idToken = await this.getIdToken();
|
|
115
126
|
if (!idToken)
|
|
@@ -160,40 +171,38 @@ export class DefaultSudoUserClient {
|
|
|
160
171
|
}
|
|
161
172
|
}
|
|
162
173
|
async getLatestAuthToken() {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
174
|
+
// Each token is looked up independently since the key manager throws
|
|
175
|
+
// KeyNotFoundError for any one of them that isn't cached, e.g. when only
|
|
176
|
+
// an ID token has been set via signInViaAssumption() with no refresh token.
|
|
177
|
+
const idToken = await this.getIdToken().catch(() => undefined);
|
|
178
|
+
const refreshToken = await this.getRefreshToken().catch(() => undefined);
|
|
179
|
+
const expiry = await this.getTokenExpiry().catch(() => undefined);
|
|
180
|
+
if (!idToken || !expiry) {
|
|
181
|
+
// If tokens are missing then it's likely due to the client not being signed in.
|
|
182
|
+
// Return an empty id token.
|
|
183
|
+
return '';
|
|
184
|
+
}
|
|
185
|
+
if (!refreshToken) {
|
|
186
|
+
// No refresh token is cached, e.g. an ID token set directly via signInViaAssumption().
|
|
187
|
+
// It cannot be refreshed, so return it as-is as long as it hasn't expired.
|
|
188
|
+
return expiry.getTime() > new Date().getTime() ? idToken : '';
|
|
189
|
+
}
|
|
190
|
+
if (expiry.getTime() > new Date().getTime() + 600 * 1000) {
|
|
191
|
+
return idToken;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
try {
|
|
195
|
+
const authTokens = await this.refreshTokens(refreshToken);
|
|
196
|
+
return authTokens.idToken;
|
|
184
197
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
198
|
+
catch (error) {
|
|
199
|
+
this.logger.info('getLatestAuthToken: Token refresh failed', {
|
|
200
|
+
error,
|
|
201
|
+
});
|
|
202
|
+
// return an empty id token
|
|
188
203
|
return '';
|
|
189
204
|
}
|
|
190
205
|
}
|
|
191
|
-
catch {
|
|
192
|
-
// The key manager throws a KeyNotFoundError if an item is not found
|
|
193
|
-
// which would indicate that the client is likely not signed in.
|
|
194
|
-
// Return an empty id token.
|
|
195
|
-
return '';
|
|
196
|
-
}
|
|
197
206
|
}
|
|
198
207
|
async signOut() {
|
|
199
208
|
let refreshToken;
|
|
@@ -351,8 +360,15 @@ export class DefaultSudoUserClient {
|
|
|
351
360
|
await this.keyManager.removeItem(apiKeyNames.tokenExpiry);
|
|
352
361
|
await this.keyManager.addString(userKeyNames.userId, uid);
|
|
353
362
|
await this.keyManager.addString(apiKeyNames.idToken, authTokens.idToken);
|
|
354
|
-
|
|
355
|
-
|
|
363
|
+
// The key manager cannot round-trip an empty-string secret, so only
|
|
364
|
+
// persist the access/refresh tokens when a real value is provided
|
|
365
|
+
// (e.g. not when only an ID token was set via signInViaAssumption()).
|
|
366
|
+
if (authTokens.accessToken) {
|
|
367
|
+
await this.keyManager.addString(apiKeyNames.accessToken, authTokens.accessToken);
|
|
368
|
+
}
|
|
369
|
+
if (authTokens.refreshToken) {
|
|
370
|
+
await this.keyManager.addString(apiKeyNames.refreshToken, authTokens.refreshToken);
|
|
371
|
+
}
|
|
356
372
|
const decoded = jwt.decode(authTokens.idToken);
|
|
357
373
|
if (decoded && decoded.payload) {
|
|
358
374
|
const payload = parseToken(decoded.payload);
|