UNPKG

aws-cognito-authorization

Version:
1,770 lines (437 loc) 19.3 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: AWSCredentials</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: AWSCredentials</h1> <section> <header> <h2>AWSCredentials</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="AWSCredentials"><span class="type-signature"></span>new AWSCredentials<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line7">line 7</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="AWSCredentialsProvider"><span class="type-signature"></span>AWSCredentialsProvider<span class="signature">(AWSCognitoIdentity)</span><span class="type-signature"></span></h4> <div class="description"> AWSCredentialsProvider call to get temporary AccessKeyId, SecretKey, and SessionToken from AWSCognitoIdentity returns: {AWSCognitoCredentials <IdentityId, Credentials <AccessKeyId, SecretKey, SessionToken, Expiration>>} </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>AWSCognitoIdentity</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line175">line 175</a> </li></ul></dd> </dl> <h4 class="name" id="AWSIdentityProvider"><span class="type-signature"></span>AWSIdentityProvider<span class="signature">(authoritativeProperty)</span><span class="type-signature"></span></h4> <div class="description"> AWSIdentityProvider call to get temporary Cognito IdentityId and Token returns: {AWSCognitoIdentity <IdentityId, Token>} </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>authoritativeProperty</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line153">line 153</a> </li></ul></dd> </dl> <h4 class="name" id="GetAuthorization"><span class="type-signature"></span>GetAuthorization<span class="signature">(authoritativeProperty)</span><span class="type-signature"></span></h4> <div class="description"> Function returns a <code>AWSCognitoIdentity</code> and <code>AWSCognitoCredentials</code> object Both are needed to assume <code>AWS.Credentials</code> returns: {AWSCognitoIdentity, AWSCognitoCredentials} </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>authoritativeProperty</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line134">line 134</a> </li></ul></dd> </dl> <h4 class="name" id="healthRequest"><span class="type-signature"></span>healthRequest<span class="signature">()</span><span class="type-signature"> &rarr; {HTTPResponse}</span></h4> <div class="description"> Does a health check on AWSCognito via <a href="https://cognito-identity.amazonaws.com/ping">GET /ping HTTP/1.1</a> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line65">line 65</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">HTTPResponse</span> </dd> </dl> <h4 class="name" id="listIdentities"><span class="type-signature"></span>listIdentities<span class="signature">(results, token)</span><span class="type-signature"> &rarr; {array}</span></h4> <div class="description"> ListIdentities call to list Identities in Identity Pool </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>results</code></td> <td class="type"> </td> <td class="default"> 10 </td> <td class="description last">amount of Identities to list</td> </tr> <tr> <td class="name"><code>token</code></td> <td class="type"> </td> <td class="default"> null </td> <td class="description last"><code>NextToken</code> to continue listing identities</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line108">line 108</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">array</span> </dd> </dl> </article> </section> <section> <header> <h2>AWSCredentials</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="AWSCredentials"><span class="type-signature">(non-null) </span>new AWSCredentials<span class="signature">(options)</span><span class="type-signature"></span></h4> <div class="description"> <code>options<code> required for communication with <a href="https://aws.amazon.com/cognito/">AWS Cognito</a> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>options</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>region</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">AWS Region of operation</td> </tr> <tr> <td class="name"><code>IdentityPoolId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">"{region}:{IdentityPoolId UUID}"</td> </tr> <tr> <td class="name"><code>DeveloperName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">"com.developer.name" for Developer provider name</td> </tr> <tr> <td class="name"><code>TokenDuration</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last">Amount of time the session token should last</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line21">line 21</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="AWSCredentialsProvider"><span class="type-signature"></span>AWSCredentialsProvider<span class="signature">(AWSCognitoIdentity)</span><span class="type-signature"></span></h4> <div class="description"> AWSCredentialsProvider call to get temporary AccessKeyId, SecretKey, and SessionToken from AWSCognitoIdentity returns: {AWSCognitoCredentials <IdentityId, Credentials <AccessKeyId, SecretKey, SessionToken, Expiration>>} </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>AWSCognitoIdentity</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line175">line 175</a> </li></ul></dd> </dl> <h4 class="name" id="AWSIdentityProvider"><span class="type-signature"></span>AWSIdentityProvider<span class="signature">(authoritativeProperty)</span><span class="type-signature"></span></h4> <div class="description"> AWSIdentityProvider call to get temporary Cognito IdentityId and Token returns: {AWSCognitoIdentity <IdentityId, Token>} </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>authoritativeProperty</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line153">line 153</a> </li></ul></dd> </dl> <h4 class="name" id="GetAuthorization"><span class="type-signature"></span>GetAuthorization<span class="signature">(authoritativeProperty)</span><span class="type-signature"></span></h4> <div class="description"> Function returns a <code>AWSCognitoIdentity</code> and <code>AWSCognitoCredentials</code> object Both are needed to assume <code>AWS.Credentials</code> returns: {AWSCognitoIdentity, AWSCognitoCredentials} </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>authoritativeProperty</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line134">line 134</a> </li></ul></dd> </dl> <h4 class="name" id="healthRequest"><span class="type-signature"></span>healthRequest<span class="signature">()</span><span class="type-signature"> &rarr; {HTTPResponse}</span></h4> <div class="description"> Does a health check on AWSCognito via <a href="https://cognito-identity.amazonaws.com/ping">GET /ping HTTP/1.1</a> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line65">line 65</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">HTTPResponse</span> </dd> </dl> <h4 class="name" id="listIdentities"><span class="type-signature"></span>listIdentities<span class="signature">(results, token)</span><span class="type-signature"> &rarr; {array}</span></h4> <div class="description"> ListIdentities call to list Identities in Identity Pool </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>results</code></td> <td class="type"> </td> <td class="default"> 10 </td> <td class="description last">amount of Identities to list</td> </tr> <tr> <td class="name"><code>token</code></td> <td class="type"> </td> <td class="default"> null </td> <td class="description last"><code>NextToken</code> to continue listing identities</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="AWSCredentials.js.html">AWSCredentials.js</a>, <a href="AWSCredentials.js.html#line108">line 108</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">array</span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AWSCredentials.html">AWSCredentials</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu May 04 2017 09:19:44 GMT-0400 (EDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>