Skip to content

Commit

Permalink
Merge c4aea67 into a14fc31
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjoyce3 committed Oct 21, 2019
2 parents a14fc31 + c4aea67 commit 8c9d5ab
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 75 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ Using npm:
npm install ibmcloud-appid-js
```

```javascript
import AppID from 'ibmcloud-appid-js';
```

From the CDN:
```html
<script src="""></script>
<script src="https://cdn.appid.cloud.ibm.com/appid-0.0.2.min.js"></script>
```

Or for development purposes use the minified file in this repo:
Expand Down
88 changes: 73 additions & 15 deletions docs/AppID.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ <h3 class="subsection-title">Methods</h3>



<h4 class="name" id="changePassword"><span class="type-signature">(async) </span>changePassword<span class="signature">(userId)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4>
<h4 class="name" id="changePassword"><span class="type-signature">(async) </span>changePassword<span class="signature">(idTokenPayload)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="global.html#Tokens">Tokens</a>>}</span></h4>



Expand All @@ -188,7 +188,7 @@ <h4 class="name" id="changePassword"><span class="type-signature">(async) </span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line186">line 186</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line175">line 175</a>
</li></ul></dd>


Expand Down Expand Up @@ -228,7 +228,7 @@ <h4 class="name" id="changePassword"><span class="type-signature">(async) </span


<div class="description">
<p>This method will open a popup to the change password widget. It requires a Cloud Directory user ID, which can be found in the ID token payload identities array.</p>
<p>This method will open a popup to the change password widget for Cloud Directory users.</p>
</div>


Expand All @@ -241,7 +241,7 @@ <h4 class="name" id="changePassword"><span class="type-signature">(async) </span

<h5>Example</h5>

<pre class="prettyprint"><code>await appID.changePassword(tokens.idTokenPayload.identities[0].id);</code></pre>
<pre class="prettyprint"><code>let tokens = await appID.changePassword(idTokenPayload);</code></pre>



Expand Down Expand Up @@ -271,7 +271,7 @@ <h5>Parameters:</h5>

<tr>

<td class="name"><code>userId</code></td>
<td class="name"><code>idTokenPayload</code></td>


<td class="type">
Expand All @@ -287,7 +287,7 @@ <h5>Parameters:</h5>



<td class="description last"><p>The Cloud Directory user ID.</p></td>
<td class="description last"><p>The id token payload.</p></td>
</tr>


Expand All @@ -308,13 +308,13 @@ <h5>Parameters:</h5>


<h5>Throws:</h5>


<ul>
<li>

<dl>
<dt>
<div class="param-desc">
<p>&quot;Missing user id&quot; The user id is missing.</p>
<p>&quot;Expect id token payload object to have identities field&quot;</p>
</div>
</dt>
<dd></dd>
Expand All @@ -334,13 +334,71 @@ <h5>Throws:</h5>
<dd></dd>
</dl>

</li>

<li>

<dl>
<dt>
<div class="param-desc">
<p>&quot;Must be a Cloud Directory user&quot;</p>
</div>
</dt>
<dd></dd>
<dt>
<dl class="param-type">
<dt>
Type
</dt>
<dd>

<span class="param-type">AppIDError</span>


</dd>
</dl>
</dt>
<dd></dd>
</dl>

</li>

<li>

<dl>
<dt>
<div class="param-desc">
<p>&quot;Missing id token payload&quot;</p>
</div>
</dt>
<dd></dd>
<dt>
<dl class="param-type">
<dt>
Type
</dt>
<dd>

<span class="param-type">AppIDError</span>


</dd>
</dl>
</dt>
<dd></dd>
</dl>

</li>
</ul>


<h5>Returns:</h5>


<div class="param-desc">
<p>The tokens of the authenticated user.</p>
</div>



<dl class="param-type">
Expand All @@ -349,7 +407,7 @@ <h5>Returns:</h5>
</dt>
<dd>

<span class="param-type">Promise.&lt;void></span>
<span class="param-type">Promise.&lt;<a href="global.html#Tokens">Tokens</a>></span>


</dd>
Expand All @@ -376,7 +434,7 @@ <h4 class="name" id="getUserInfo"><span class="type-signature">(async) </span>ge

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line165">line 165</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line152">line 152</a>
</li></ul></dd>


Expand Down Expand Up @@ -590,7 +648,7 @@ <h4 class="name" id="init"><span class="type-signature">(async) </span>init<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line63">line 63</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line61">line 61</a>
</li></ul></dd>


Expand Down Expand Up @@ -1003,7 +1061,7 @@ <h4 class="name" id="signin"><span class="type-signature">(async) </span>signin<

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line98">line 98</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line96">line 96</a>
</li></ul></dd>


Expand Down Expand Up @@ -1228,7 +1286,7 @@ <h4 class="name" id="silentSignin"><span class="type-signature">(async) </span>s

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line133">line 133</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line114">line 114</a>
</li></ul></dd>


Expand Down Expand Up @@ -1457,7 +1515,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Wed Oct 09 2019 14:54:34 GMT-0500 (CDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Mon Oct 21 2019 11:33:35 GMT-0500 (CDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h4 class="name" id="Tokens">Tokens</h4>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line79">line 79</a>
<a href="index.js.html">index.js</a>, <a href="index.js.html#line77">line 77</a>
</li></ul></dd>


Expand Down Expand Up @@ -329,7 +329,7 @@ <h5>Type:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Wed Oct 09 2019 14:54:34 GMT-0500 (CDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Mon Oct 21 2019 11:33:35 GMT-0500 (CDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
8 changes: 5 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h3> </h3>
<article><p><a href="https://www.codacy.com/app/kajabfab/appid-clientsdk-js?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ibm-cloud-security/appid-clientsdk-js&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/a30e7499a5234d3494508b7050975beb" alt="Codacy Badge"></a></p>
<h1 id="ibm-cloud-app-id-client-sdk">IBM Cloud App ID Client SDK</h1>
<p>Client-side javascript SDK for the IBM Cloud App ID service.<br>
Read the <a href="https://console.ng.bluemix.net/docs/services/appid/index.html#gettingstarted">official documentation</a> for information about getting started with IBM Cloud App ID Service.</p>
Read the <a href="https://test.cloud.ibm.com/docs/services/appid?topic=appid-single-page">official documentation</a> for information on getting started with IBM Cloud App ID and single-page applications.</p>
<h2 id="table-of-contents">Table of Contents</h2>
<ul>
<li>
Expand All @@ -77,8 +77,10 @@ <h2 id="installation">Installation</h2>
<p>Using npm:</p>
<pre class="prettyprint source lang-javascript"><code>npm install ibmcloud-appid-js
</code></pre>
<pre class="prettyprint source lang-javascript"><code>import AppID from 'ibmcloud-appid-js';
</code></pre>
<p>From the CDN:</p>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;&quot;&quot;>&lt;/script>
<pre class="prettyprint source lang-html"><code>&lt;script src=&quot;https://cdn.appid.cloud.ibm.com/appid-0.0.2.min.js&quot;>&lt;/script>
</code></pre>
<p>Or for development purposes use the minified file in this repo:</p>
<pre class="prettyprint source lang-html"><code>&lt;script type='text/javascript' src=&quot;dist/appid.min.js&quot;>&lt;/script>
Expand Down Expand Up @@ -119,7 +121,7 @@ <h2 id="api-reference">API Reference</h2>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Wed Oct 09 2019 14:54:34 GMT-0500 (CDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on Mon Oct 21 2019 11:33:35 GMT-0500 (CDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down

0 comments on commit 8c9d5ab

Please sign in to comment.