@sudoplatform/sudo-user 9.0.2 → 10.0.1
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/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/icons.css +1043 -0
- package/docs/assets/{images/icons.png → icons.png} +0 -0
- package/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
- package/docs/assets/main.js +52 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1388 -0
- package/docs/assets/{images/widgets.png → widgets.png} +0 -0
- package/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
- package/docs/classes/AlreadyRegisteredError.html +8 -0
- package/docs/classes/DefaultSudoUserClient.html +68 -0
- package/docs/classes/IdentityServiceConfigNotFoundError.html +10 -0
- package/docs/classes/LocalAuthenticationProvider.html +12 -0
- package/docs/classes/TESTAuthenticationProvider.html +11 -0
- package/docs/index.html +44 -159
- package/docs/interfaces/AuthenticationProvider.html +6 -0
- package/docs/interfaces/AuthenticationTokens.html +7 -0
- package/docs/interfaces/SudoUserClient.html +90 -0
- package/docs/modules.html +1 -143
- package/lib/client/apiClient.js +9 -6
- package/lib/core/auth-store.js +5 -1
- package/lib/core/key-manager.js +2 -1
- package/lib/core/sdk-config.d.ts +17 -3
- package/lib/core/sdk-config.js +23 -8
- package/lib/gen/graphql-types.d.ts +9 -9
- package/lib/index.d.ts +1 -1
- package/lib/index.js +20 -15
- package/lib/sdk.d.ts +1 -0
- package/lib/sdk.js +18 -0
- package/lib/user/auth-provider.js +1 -1
- package/lib/user/auth.d.ts +1 -0
- package/lib/user/auth.js +6 -3
- package/lib/user/error.d.ts +13 -1
- package/lib/user/error.js +31 -4
- package/lib/user/identity-provider.js +6 -4
- package/lib/user/user-client.js +19 -16
- package/package.json +49 -46
- package/docs/assets/css/main.css +0 -2660
- package/docs/assets/js/main.js +0 -248
- package/docs/assets/js/search.js +0 -1
- package/docs/classes/alreadyregisterederror.html +0 -346
- package/docs/classes/defaultsudouserclient.html +0 -1045
- package/docs/classes/localauthenticationprovider.html +0 -287
- package/docs/classes/testauthenticationprovider.html +0 -317
- package/docs/interfaces/authenticationprovider.html +0 -216
- package/docs/interfaces/authenticationtokens.html +0 -233
- package/docs/interfaces/sudouserclient.html +0 -855
- package/lib/core/protected-store.d.ts +0 -5
- package/lib/runtimes/browser/browser-crypto.d.ts +0 -2
package/docs/index.html
CHANGED
|
@@ -1,159 +1,44 @@
|
|
|
1
|
-
<!
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
</div>
|
|
46
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<div class="tsd-page-title">
|
|
52
|
-
<div class="container">
|
|
53
|
-
<h1>@sudoplatform/sudo-user</h1>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</header>
|
|
57
|
-
<div class="container container-main">
|
|
58
|
-
<div class="row">
|
|
59
|
-
<div class="col-8 col-content">
|
|
60
|
-
<div class="tsd-panel tsd-typography">
|
|
61
|
-
<a href="#sudo-user-sdk-for-web" id="sudo-user-sdk-for-web" style="color: inherit; text-decoration: none;">
|
|
62
|
-
<h1>Sudo User SDK for Web</h1>
|
|
63
|
-
</a>
|
|
64
|
-
<a href="#project-setup" id="project-setup" style="color: inherit; text-decoration: none;">
|
|
65
|
-
<h2>Project Setup</h2>
|
|
66
|
-
</a>
|
|
67
|
-
<p><strong>Cloning this repo</strong></p>
|
|
68
|
-
<p>To clone this repo along with the submodule linkage execute this command:</p>
|
|
69
|
-
<p><code>git clone git@gitlab.tools.anonyome.com:platform/identity/sudo-user-web.git</code></p>
|
|
70
|
-
<p><strong>Getting the latest</strong></p>
|
|
71
|
-
<p><code>git pull</code></p>
|
|
72
|
-
<p><strong>Installing Dependencies</strong></p>
|
|
73
|
-
<p><code>yarn install</code></p>
|
|
74
|
-
<p><strong>Build Solution</strong></p>
|
|
75
|
-
<p><code>yarn build</code></p>
|
|
76
|
-
<a href="#setup-integration-tests" id="setup-integration-tests" style="color: inherit; text-decoration: none;">
|
|
77
|
-
<h2>Setup integration tests</h2>
|
|
78
|
-
</a>
|
|
79
|
-
<p>Visit the <a href="https://sudoplatform.com/docs">Sudos section</a> of the Sudo Platform Developer Docs for SDK integration instructions.</p>
|
|
80
|
-
<a href="#running-unit-and-integration-tests" id="running-unit-and-integration-tests" style="color: inherit; text-decoration: none;">
|
|
81
|
-
<h2>Running Unit and Integration tests</h2>
|
|
82
|
-
</a>
|
|
83
|
-
<p><code>yarn test</code></p>
|
|
84
|
-
<a href="#release-procedure" id="release-procedure" style="color: inherit; text-decoration: none;">
|
|
85
|
-
<h2>Release Procedure</h2>
|
|
86
|
-
</a>
|
|
87
|
-
<p><strong>Publish Internal</strong></p>
|
|
88
|
-
<p>For new releases that contain new functionality we should publish internally first before publishing to Github.</p>
|
|
89
|
-
<p>To publish a new version of Sudo User SDK for Web for internal consumption:</p>
|
|
90
|
-
<ul>
|
|
91
|
-
<li>Create a new tag from master branch with the following naming <code>/alpha$/</code></li>
|
|
92
|
-
</ul>
|
|
93
|
-
<p><strong>Publish External</strong></p>
|
|
94
|
-
<p>For new releases that contain bug fixes or that have been through a <code>publish internal</code> procedure and have been signed off.</p>
|
|
95
|
-
<p>To publish a new version of Sudo User SDK for Web to Github for external consumption:</p>
|
|
96
|
-
<ul>
|
|
97
|
-
<li>Create a new tag from master with the release version. ie <code>1.0.0</code></li>
|
|
98
|
-
</ul>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
102
|
-
<nav class="tsd-navigation primary">
|
|
103
|
-
<ul>
|
|
104
|
-
<li class=" ">
|
|
105
|
-
<a href="modules.html">Exports</a>
|
|
106
|
-
</li>
|
|
107
|
-
</ul>
|
|
108
|
-
</nav>
|
|
109
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
110
|
-
<ul class="before-current">
|
|
111
|
-
<li class=" tsd-kind-class">
|
|
112
|
-
<a href="classes/alreadyregisterederror.html" class="tsd-kind-icon">Already<wbr>Registered<wbr>Error</a>
|
|
113
|
-
</li>
|
|
114
|
-
<li class=" tsd-kind-class">
|
|
115
|
-
<a href="classes/defaultsudouserclient.html" class="tsd-kind-icon">Default<wbr>Sudo<wbr>User<wbr>Client</a>
|
|
116
|
-
</li>
|
|
117
|
-
<li class=" tsd-kind-class">
|
|
118
|
-
<a href="classes/localauthenticationprovider.html" class="tsd-kind-icon">Local<wbr>Authentication<wbr>Provider</a>
|
|
119
|
-
</li>
|
|
120
|
-
<li class=" tsd-kind-class">
|
|
121
|
-
<a href="classes/testauthenticationprovider.html" class="tsd-kind-icon">TESTAuthentication<wbr>Provider</a>
|
|
122
|
-
</li>
|
|
123
|
-
<li class=" tsd-kind-interface">
|
|
124
|
-
<a href="interfaces/authenticationprovider.html" class="tsd-kind-icon">Authentication<wbr>Provider</a>
|
|
125
|
-
</li>
|
|
126
|
-
<li class=" tsd-kind-interface">
|
|
127
|
-
<a href="interfaces/authenticationtokens.html" class="tsd-kind-icon">Authentication<wbr>Tokens</a>
|
|
128
|
-
</li>
|
|
129
|
-
<li class=" tsd-kind-interface">
|
|
130
|
-
<a href="interfaces/sudouserclient.html" class="tsd-kind-icon">Sudo<wbr>User<wbr>Client</a>
|
|
131
|
-
</li>
|
|
132
|
-
</ul>
|
|
133
|
-
</nav>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
<footer class="with-border-bottom">
|
|
138
|
-
<div class="container">
|
|
139
|
-
<h2>Legend</h2>
|
|
140
|
-
<div class="tsd-legend-group">
|
|
141
|
-
<ul class="tsd-legend">
|
|
142
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
143
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
|
144
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
145
|
-
</ul>
|
|
146
|
-
<ul class="tsd-legend">
|
|
147
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
148
|
-
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
149
|
-
</ul>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</footer>
|
|
153
|
-
<div class="container tsd-generator">
|
|
154
|
-
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="overlay"></div>
|
|
157
|
-
<script src="assets/js/main.js"></script>
|
|
158
|
-
</body>
|
|
159
|
-
</html>
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@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 async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@sudoplatform/sudo-user</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@sudoplatform/sudo-user</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><div class="tsd-panel tsd-typography">
|
|
2
|
+
<a href="#sudo-user-sdk-for-web" id="sudo-user-sdk-for-web" style="color: inherit; text-decoration: none;">
|
|
3
|
+
<h1>Sudo User SDK for Web</h1>
|
|
4
|
+
</a>
|
|
5
|
+
|
|
6
|
+
<a href="#project-setup" id="project-setup" style="color: inherit; text-decoration: none;">
|
|
7
|
+
<h2>Project Setup</h2>
|
|
8
|
+
</a>
|
|
9
|
+
<p><strong>Cloning this repo</strong></p>
|
|
10
|
+
<p>To clone this repo along with the submodule linkage execute this command:</p>
|
|
11
|
+
<p><code>git clone git@gitlab.tools.anonyome.com:platform/identity/sudo-user-web.git</code></p>
|
|
12
|
+
<p><strong>Getting the latest</strong></p>
|
|
13
|
+
<p><code>git pull</code></p>
|
|
14
|
+
<p><strong>Installing Dependencies</strong></p>
|
|
15
|
+
<p><code>yarn install</code></p>
|
|
16
|
+
<p><strong>Build Solution</strong></p>
|
|
17
|
+
<p><code>yarn build</code></p>
|
|
18
|
+
|
|
19
|
+
<a href="#setup-integration-tests" id="setup-integration-tests" style="color: inherit; text-decoration: none;">
|
|
20
|
+
<h2>Setup integration tests</h2>
|
|
21
|
+
</a>
|
|
22
|
+
<p>Visit the <a href="https://sudoplatform.com/docs">Sudos section</a> of the Sudo Platform Developer Docs for SDK integration instructions.</p>
|
|
23
|
+
|
|
24
|
+
<a href="#running-unit-and-integration-tests" id="running-unit-and-integration-tests" style="color: inherit; text-decoration: none;">
|
|
25
|
+
<h2>Running Unit and Integration tests</h2>
|
|
26
|
+
</a>
|
|
27
|
+
<p><code>yarn test</code></p>
|
|
28
|
+
|
|
29
|
+
<a href="#release-procedure" id="release-procedure" style="color: inherit; text-decoration: none;">
|
|
30
|
+
<h2>Release Procedure</h2>
|
|
31
|
+
</a>
|
|
32
|
+
<p><strong>Publish Internal</strong></p>
|
|
33
|
+
<p>For new releases that contain new functionality we should publish internally first before publishing to Github.</p>
|
|
34
|
+
<p>To publish a new version of Sudo User SDK for Web for internal consumption:</p>
|
|
35
|
+
<ul>
|
|
36
|
+
<li>Create a new tag from master branch with the following naming <code>/alpha$/</code></li>
|
|
37
|
+
</ul>
|
|
38
|
+
<p><strong>Publish External</strong></p>
|
|
39
|
+
<p>For new releases that contain bug fixes or that have been through a <code>publish internal</code> procedure and have been signed off.</p>
|
|
40
|
+
<p>To publish a new version of Sudo User SDK for Web to Github for external consumption:</p>
|
|
41
|
+
<ul>
|
|
42
|
+
<li>Create a new tag from master with the release version. ie <code>1.0.0</code></li>
|
|
43
|
+
</ul>
|
|
44
|
+
</div></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/AlreadyRegisteredError.html" class="tsd-kind-icon">Already<wbr/>Registered<wbr/>Error</a></li><li class="tsd-kind-class"><a href="classes/DefaultSudoUserClient.html" class="tsd-kind-icon">Default<wbr/>Sudo<wbr/>User<wbr/>Client</a></li><li class="tsd-kind-class"><a href="classes/IdentityServiceConfigNotFoundError.html" class="tsd-kind-icon">Identity<wbr/>Service<wbr/>Config<wbr/>Not<wbr/>Found<wbr/>Error</a></li><li class="tsd-kind-class"><a href="classes/LocalAuthenticationProvider.html" class="tsd-kind-icon">Local<wbr/>Authentication<wbr/>Provider</a></li><li class="tsd-kind-class"><a href="classes/TESTAuthenticationProvider.html" class="tsd-kind-icon">TESTAuthentication<wbr/>Provider</a></li><li class="tsd-kind-interface"><a href="interfaces/AuthenticationProvider.html" class="tsd-kind-icon">Authentication<wbr/>Provider</a></li><li class="tsd-kind-interface"><a href="interfaces/AuthenticationTokens.html" class="tsd-kind-icon">Authentication<wbr/>Tokens</a></li><li class="tsd-kind-interface"><a href="interfaces/SudoUserClient.html" class="tsd-kind-icon">Sudo<wbr/>User<wbr/>Client</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AuthenticationProvider | @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 async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@sudoplatform/sudo-user</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@sudoplatform/sudo-user</a></li><li><a href="AuthenticationProvider.html">AuthenticationProvider</a></li></ul><h1>Interface AuthenticationProvider</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">AuthenticationProvider</span></li></ul></section><section class="tsd-panel"><h3>Implemented by</h3><ul class="tsd-hierarchy"><li><a href="../classes/LocalAuthenticationProvider.html" class="tsd-signature-type" data-tsd-kind="Class">LocalAuthenticationProvider</a></li><li><a href="../classes/TESTAuthenticationProvider.html" class="tsd-signature-type" data-tsd-kind="Class">TESTAuthenticationProvider</a></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="AuthenticationProvider.html#getAuthenticationInfo" class="tsd-kind-icon">get<wbr/>Authentication<wbr/>Info</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="AuthenticationProvider.html#reset" class="tsd-kind-icon">reset</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getAuthenticationInfo" class="tsd-anchor"></a><h3>get<wbr/>Authentication<wbr/>Info</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Authentication<wbr/>Info<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">AuthenticationInfo</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/auth-provider.ts:38</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Generates and returns authentication information.</p>
|
|
3
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">AuthenticationInfo</span><span class="tsd-signature-symbol">></span></h4><div><p>authentication information.</p>
|
|
4
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="reset" class="tsd-anchor"></a><h3>reset</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">reset<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/auth-provider.ts:42</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
5
|
+
<p>Resets internal state and releases any associated resources.</p>
|
|
6
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="AuthenticationProvider.html" class="tsd-kind-icon">Authentication<wbr/>Provider</a><ul><li class="tsd-kind-method tsd-parent-kind-interface"><a href="AuthenticationProvider.html#getAuthenticationInfo" class="tsd-kind-icon">get<wbr/>Authentication<wbr/>Info</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="AuthenticationProvider.html#reset" class="tsd-kind-icon">reset</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AuthenticationTokens | @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 async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@sudoplatform/sudo-user</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@sudoplatform/sudo-user</a></li><li><a href="AuthenticationTokens.html">AuthenticationTokens</a></li></ul><h1>Interface AuthenticationTokens</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Encapsulates the authentication tokens obtained from a successful authentication.</p>
|
|
3
|
+
</div><dl class="tsd-comment-tags"><dt>param idToken</dt><dd><p>ID token containing the user's identity attributes.</p>
|
|
4
|
+
</dd><dt>param accessToken</dt><dd><p>access token required for authorizing API access.</p>
|
|
5
|
+
</dd><dt>param refreshToken</dt><dd><p>refresh token used for refreshing ID and access tokens.</p>
|
|
6
|
+
</dd><dt>param tokenExpiry</dt><dd><p>expiry of ID and access tokens in milliseconds.</p>
|
|
7
|
+
</dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">AuthenticationTokens</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#accessToken" class="tsd-kind-icon">access<wbr/>Token</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#idToken" class="tsd-kind-icon">id<wbr/>Token</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#refreshToken" class="tsd-kind-icon">refresh<wbr/>Token</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#tokenExpiry" class="tsd-kind-icon">token<wbr/>Expiry</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="accessToken" class="tsd-anchor"></a><h3>access<wbr/>Token</h3><div class="tsd-signature tsd-kind-icon">access<wbr/>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:14</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="idToken" class="tsd-anchor"></a><h3>id<wbr/>Token</h3><div class="tsd-signature tsd-kind-icon">id<wbr/>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:13</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="refreshToken" class="tsd-anchor"></a><h3>refresh<wbr/>Token</h3><div class="tsd-signature tsd-kind-icon">refresh<wbr/>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:15</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="tokenExpiry" class="tsd-anchor"></a><h3>token<wbr/>Expiry</h3><div class="tsd-signature tsd-kind-icon">token<wbr/>Expiry<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:16</li></ul></aside></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="AuthenticationTokens.html" class="tsd-kind-icon">Authentication<wbr/>Tokens</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#accessToken" class="tsd-kind-icon">access<wbr/>Token</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#idToken" class="tsd-kind-icon">id<wbr/>Token</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#refreshToken" class="tsd-kind-icon">refresh<wbr/>Token</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="AuthenticationTokens.html#tokenExpiry" class="tsd-kind-icon">token<wbr/>Expiry</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SudoUserClient | @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 async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@sudoplatform/sudo-user</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@sudoplatform/sudo-user</a></li><li><a href="SudoUserClient.html">SudoUserClient</a></li></ul><h1>Interface SudoUserClient</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
|
+
<p>Interface encapsulating a library of functions for calling Sudo Platform identity service,
|
|
3
|
+
handling federated sign in, managing keys and performing cryptographic operations.</p>
|
|
4
|
+
</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">SudoUserClient</span></li></ul></section><section class="tsd-panel"><h3>Implemented by</h3><ul class="tsd-hierarchy"><li><a href="../classes/DefaultSudoUserClient.html" class="tsd-signature-type" data-tsd-kind="Class">DefaultSudoUserClient</a></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="SudoUserClient.html#sudoKeyManager" class="tsd-kind-icon">sudo<wbr/>Key<wbr/>Manager</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#clearAuthenticationTokens" class="tsd-kind-icon">clear<wbr/>Authentication<wbr/>Tokens</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getAccessToken" class="tsd-kind-icon">get<wbr/>Access<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getIdToken" class="tsd-kind-icon">get<wbr/>Id<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getLatestAuthToken" class="tsd-kind-icon">get<wbr/>Latest<wbr/>Auth<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getRefreshToken" class="tsd-kind-icon">get<wbr/>Refresh<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getRefreshTokenExpiry" class="tsd-kind-icon">get<wbr/>Refresh<wbr/>Token<wbr/>Expiry</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getSubject" class="tsd-kind-icon">get<wbr/>Subject</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getTokenExpiry" class="tsd-kind-icon">get<wbr/>Token<wbr/>Expiry</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getUserClaim" class="tsd-kind-icon">get<wbr/>User<wbr/>Claim</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getUserName" class="tsd-kind-icon">get<wbr/>User<wbr/>Name</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#globalSignOut" class="tsd-kind-icon">global<wbr/>Sign<wbr/>Out</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#isRegistered" class="tsd-kind-icon">is<wbr/>Registered</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#isSignedIn" class="tsd-kind-icon">is<wbr/>Signed<wbr/>In</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#presentFederatedSignInUI" class="tsd-kind-icon">present<wbr/>Federated<wbr/>Sign<wbr/>InUI</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#presentSignOutUI" class="tsd-kind-icon">present<wbr/>Sign<wbr/>OutUI</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#processFederatedSignInTokens" class="tsd-kind-icon">process<wbr/>Federated<wbr/>Sign<wbr/>In<wbr/>Tokens</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#refreshTokens" class="tsd-kind-icon">refresh<wbr/>Tokens</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#registerWithAuthenticationProvider" class="tsd-kind-icon">register<wbr/>With<wbr/>Authentication<wbr/>Provider</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#reset" class="tsd-kind-icon">reset</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#setUserName" class="tsd-kind-icon">set<wbr/>User<wbr/>Name</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#signInWithAuthenticationProvider" class="tsd-kind-icon">sign<wbr/>In<wbr/>With<wbr/>Authentication<wbr/>Provider</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#signInWithKey" class="tsd-kind-icon">sign<wbr/>In<wbr/>With<wbr/>Key</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="sudoKeyManager" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> sudo<wbr/>Key<wbr/>Manager</h3><div class="tsd-signature tsd-kind-icon">sudo<wbr/>Key<wbr/>Manager<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SudoKeyManager</span></div><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:171</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
5
|
+
<p>Getter to retrieve the SudoKeyManager</p>
|
|
6
|
+
</div></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="clearAuthenticationTokens" class="tsd-anchor"></a><h3>clear<wbr/>Authentication<wbr/>Tokens</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">clear<wbr/>Authentication<wbr/>Tokens<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:156</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
7
|
+
<p>Clears cached authentication tokens.</p>
|
|
8
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getAccessToken" class="tsd-anchor"></a><h3>get<wbr/>Access<wbr/>Token</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Access<wbr/>Token<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:47</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
9
|
+
<p>Returns the access token cached from the last sign-in.</p>
|
|
10
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>access token.</p>
|
|
11
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getIdToken" class="tsd-anchor"></a><h3>get<wbr/>Id<wbr/>Token</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Id<wbr/>Token<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:41</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
12
|
+
<p>Returns the ID token cached from the last sign-in.</p>
|
|
13
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>ID token.</p>
|
|
14
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getLatestAuthToken" class="tsd-anchor"></a><h3>get<wbr/>Latest<wbr/>Auth<wbr/>Token</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Latest<wbr/>Auth<wbr/>Token<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:85</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
15
|
+
<p>Retrieves the latest ID token. This is to be used by the AWS AppSync client.</p>
|
|
16
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>the latest ID token</p>
|
|
17
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getRefreshToken" class="tsd-anchor"></a><h3>get<wbr/>Refresh<wbr/>Token</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Refresh<wbr/>Token<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:53</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
18
|
+
<p>Returns the refresh token cached from the last sign-in.</p>
|
|
19
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>refresh token.</p>
|
|
20
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getRefreshTokenExpiry" class="tsd-anchor"></a><h3>get<wbr/>Refresh<wbr/>Token<wbr/>Expiry</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Refresh<wbr/>Token<wbr/>Expiry<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:65</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
21
|
+
<p>Returns the refresh token expiry cached from the last sign-in.</p>
|
|
22
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">></span></h4><div><p>refresh token expiry.</p>
|
|
23
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getSubject" class="tsd-anchor"></a><h3>get<wbr/>Subject</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Subject<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:105</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
24
|
+
<p>Returns the subject of the user associated with this client.
|
|
25
|
+
Note: This is an internal method used by other Sudo platform SDKs.</p>
|
|
26
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>user subject.</p>
|
|
27
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getTokenExpiry" class="tsd-anchor"></a><h3>get<wbr/>Token<wbr/>Expiry</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>Token<wbr/>Expiry<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:59</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
28
|
+
<p>Returns the ID and access token expiry cached from the last sign-in.</p>
|
|
29
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Date</span><span class="tsd-signature-symbol">></span></h4><div><p>token expiry.</p>
|
|
30
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getUserClaim" class="tsd-anchor"></a><h3>get<wbr/>User<wbr/>Claim</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>User<wbr/>Claim<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:111</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
31
|
+
<p>Returns the specified claim associated with the user's identity.</p>
|
|
32
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
33
|
+
<p>claim name.</p>
|
|
34
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getUserName" class="tsd-anchor"></a><h3>get<wbr/>User<wbr/>Name</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">get<wbr/>User<wbr/>Name<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:92</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
35
|
+
<p>Returns the user name associated with this client. The username maybe needed to contact
|
|
36
|
+
the support team when diagnosing an issue related to a specific user.</p>
|
|
37
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>user name.</p>
|
|
38
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="globalSignOut" class="tsd-anchor"></a><h3>global<wbr/>Sign<wbr/>Out</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">global<wbr/>Sign<wbr/>Out<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:115</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
39
|
+
<p>Signs out the user from all devices.</p>
|
|
40
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="isRegistered" class="tsd-anchor"></a><h3>is<wbr/>Registered</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">is<wbr/>Registered<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:145</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
41
|
+
<p>Indicates whether or not this client is registered with Sudo Platform backend.</p>
|
|
42
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4><div><p><em>true</em> if the client is registered.</p>
|
|
43
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="isSignedIn" class="tsd-anchor"></a><h3>is<wbr/>Signed<wbr/>In</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">is<wbr/>Signed<wbr/>In<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:72</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
44
|
+
<p>Indicates whether or not this client is signed in with Sudo Platform backend. The client is
|
|
45
|
+
considered signed in if it cached valid ID, access and refresh tokens.</p>
|
|
46
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4><div><p><em>true</em> if the client is signed in.</p>
|
|
47
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="presentFederatedSignInUI" class="tsd-anchor"></a><h3>present<wbr/>Federated<wbr/>Sign<wbr/>InUI</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">present<wbr/>Federated<wbr/>Sign<wbr/>InUI<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:27</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
48
|
+
<p>Presents the sign in UI for federated sign in using an external identity provider.</p>
|
|
49
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="presentSignOutUI" class="tsd-anchor"></a><h3>present<wbr/>Sign<wbr/>OutUI</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">present<wbr/>Sign<wbr/>OutUI<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:162</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
50
|
+
<p>Presents the Cognito hosted UI signout endpoint.
|
|
51
|
+
When the endpoint is invoked, the hosted web app's cookies
|
|
52
|
+
will be invalidated, but the user is not logged out of Cognito.</p>
|
|
53
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="processFederatedSignInTokens" class="tsd-anchor"></a><h3>process<wbr/>Federated<wbr/>Sign<wbr/>In<wbr/>Tokens</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">process<wbr/>Federated<wbr/>Sign<wbr/>In<wbr/>Tokens<span class="tsd-signature-symbol">(</span>url<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:35</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
54
|
+
<p>Processes tokens from federated sign in returned to the specified URL.
|
|
55
|
+
The tokens are passed to the web app via a redirect URL.</p>
|
|
56
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>url: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
57
|
+
<p>callback URL containing the tokens.</p>
|
|
58
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></h4><div><p>Successful authentication result AuthenticationTokens.</p>
|
|
59
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="refreshTokens" class="tsd-anchor"></a><h3>refresh<wbr/>Tokens</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">refresh<wbr/>Tokens<span class="tsd-signature-symbol">(</span>refreshToken<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:79</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
60
|
+
<p>Refresh the access and ID tokens using the refresh token.</p>
|
|
61
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>refreshToken: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
62
|
+
<p>refresh token used to refresh the access and ID tokens.</p>
|
|
63
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></h4><div><p>Successful authentication result AuthenticationTokens containing refreshed tokens</p>
|
|
64
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="registerWithAuthenticationProvider" class="tsd-anchor"></a><h3>register<wbr/>With<wbr/>Authentication<wbr/>Provider</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">register<wbr/>With<wbr/>Authentication<wbr/>Provider<span class="tsd-signature-symbol">(</span>authenticationProvider<span class="tsd-signature-symbol">: </span><a href="AuthenticationProvider.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationProvider</a>, registrationId<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:125</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
65
|
+
<p>Registers this client against the backend with an external authentication provider. The caller must
|
|
66
|
+
implement AuthenticationProvider protocol to return the appropriate authentication token required
|
|
67
|
+
to authorize the registration request.</p>
|
|
68
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>authenticationProvider: <a href="AuthenticationProvider.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationProvider</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
69
|
+
<p>authentication provider that provides the authentication token.</p>
|
|
70
|
+
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> registrationId: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
71
|
+
<p>registration ID to uniquely identify this registration request.</p>
|
|
72
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4><div><p>user ID of the newly created user</p>
|
|
73
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="reset" class="tsd-anchor"></a><h3>reset</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">reset<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:166</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
74
|
+
<p>Resets internal state and clears any cached data.</p>
|
|
75
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="setUserName" class="tsd-anchor"></a><h3>set<wbr/>User<wbr/>Name</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">set<wbr/>User<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:98</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
76
|
+
<p>Sets the user name associated with this client.</p>
|
|
77
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
78
|
+
<p>user name.</p>
|
|
79
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="signInWithAuthenticationProvider" class="tsd-anchor"></a><h3>sign<wbr/>In<wbr/>With<wbr/>Authentication<wbr/>Provider</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">sign<wbr/>In<wbr/>With<wbr/>Authentication<wbr/>Provider<span class="tsd-signature-symbol">(</span>authenticationProvider<span class="tsd-signature-symbol">: </span><a href="AuthenticationProvider.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationProvider</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:137</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
80
|
+
<p>Sign into the backend using an external authentication provider. Caller must implement
|
|
81
|
+
<em>AuthenticationProvider</em> interface to return the appropriate authentication token associated with
|
|
82
|
+
the external identity registered with <em>registerWithAuthenticationProvider</em>.</p>
|
|
83
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>authenticationProvider: <a href="AuthenticationProvider.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationProvider</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
84
|
+
<p>authentication provider that provides the authentication token.</p>
|
|
85
|
+
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></h4><div><p>authentication tokens associated with the successful sign in.</p>
|
|
86
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="signInWithKey" class="tsd-anchor"></a><h3>sign<wbr/>In<wbr/>With<wbr/>Key</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">sign<wbr/>In<wbr/>With<wbr/>Key<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in src/user/user-client-interface.ts:152</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
87
|
+
<p>Sign into the backend using a private key. The client must have created a private/public key pair via
|
|
88
|
+
the <em>registerWithAuthenticationProvider</em> method.</p>
|
|
89
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="AuthenticationTokens.html" class="tsd-signature-type" data-tsd-kind="Interface">AuthenticationTokens</a><span class="tsd-signature-symbol">></span></h4><div><p>authentication tokens associated with the successful sign in.</p>
|
|
90
|
+
</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="SudoUserClient.html" class="tsd-kind-icon">Sudo<wbr/>User<wbr/>Client</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="SudoUserClient.html#sudoKeyManager" class="tsd-kind-icon">sudo<wbr/>Key<wbr/>Manager</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#clearAuthenticationTokens" class="tsd-kind-icon">clear<wbr/>Authentication<wbr/>Tokens</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getAccessToken" class="tsd-kind-icon">get<wbr/>Access<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getIdToken" class="tsd-kind-icon">get<wbr/>Id<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getLatestAuthToken" class="tsd-kind-icon">get<wbr/>Latest<wbr/>Auth<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getRefreshToken" class="tsd-kind-icon">get<wbr/>Refresh<wbr/>Token</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getRefreshTokenExpiry" class="tsd-kind-icon">get<wbr/>Refresh<wbr/>Token<wbr/>Expiry</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getSubject" class="tsd-kind-icon">get<wbr/>Subject</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getTokenExpiry" class="tsd-kind-icon">get<wbr/>Token<wbr/>Expiry</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getUserClaim" class="tsd-kind-icon">get<wbr/>User<wbr/>Claim</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#getUserName" class="tsd-kind-icon">get<wbr/>User<wbr/>Name</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#globalSignOut" class="tsd-kind-icon">global<wbr/>Sign<wbr/>Out</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#isRegistered" class="tsd-kind-icon">is<wbr/>Registered</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#isSignedIn" class="tsd-kind-icon">is<wbr/>Signed<wbr/>In</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#presentFederatedSignInUI" class="tsd-kind-icon">present<wbr/>Federated<wbr/>Sign<wbr/>InUI</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#presentSignOutUI" class="tsd-kind-icon">present<wbr/>Sign<wbr/>OutUI</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#processFederatedSignInTokens" class="tsd-kind-icon">process<wbr/>Federated<wbr/>Sign<wbr/>In<wbr/>Tokens</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#refreshTokens" class="tsd-kind-icon">refresh<wbr/>Tokens</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#registerWithAuthenticationProvider" class="tsd-kind-icon">register<wbr/>With<wbr/>Authentication<wbr/>Provider</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#reset" class="tsd-kind-icon">reset</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#setUserName" class="tsd-kind-icon">set<wbr/>User<wbr/>Name</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#signInWithAuthenticationProvider" class="tsd-kind-icon">sign<wbr/>In<wbr/>With<wbr/>Authentication<wbr/>Provider</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="SudoUserClient.html#signInWithKey" class="tsd-kind-icon">sign<wbr/>In<wbr/>With<wbr/>Key</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|