UNPKG

periodicjs.ext.login

Version:

An authentication extension for periodicjs that uses passport to authenticate user sessions.

1,322 lines (421 loc) 17.3 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Global</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">Global</h1> <section> <header> <h2> </h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name" id="facebook"><span class="type-signature"></span>facebook<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>logs user in via facebook oauth2</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="social_controller.js.html">controller/social_controller.js</a>, <a href="social_controller.js.html#line16">line 16</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>next() callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <dt> <h4 class="name" id="facebookcallback"><span class="type-signature"></span>facebookcallback<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>facebook oauth callback</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="social_controller.js.html">controller/social_controller.js</a>, <a href="social_controller.js.html#line33">line 33</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>next() callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <dt> <h4 class="name" id="instagram"><span class="type-signature"></span>instagram<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>logs user in via instagram oauth2</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="social_controller.js.html">controller/social_controller.js</a>, <a href="social_controller.js.html#line48">line 48</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>next() callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <dt> <h4 class="name" id="instagramcallback"><span class="type-signature"></span>instagramcallback<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>instagram oauth callback</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="social_controller.js.html">controller/social_controller.js</a>, <a href="social_controller.js.html#line65">line 65</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>next() callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <dt> <h4 class="name" id="saveUser"><span class="type-signature"></span>saveUser<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>description The save user function has two special fn calls on the model to mark the properties on it as changed/modified this gets around some werid edge cases when its being updated in memory but not save in mongo</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="token_controller.js.html">controller/token_controller.js</a>, <a href="token_controller.js.html#line94">line 94</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="twitter"><span class="type-signature"></span>twitter<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>logs user in via twitter oauth2</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="social_controller.js.html">controller/social_controller.js</a>, <a href="social_controller.js.html#line80">line 80</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>next() callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <dt> <h4 class="name" id="twittercallback"><span class="type-signature"></span>twittercallback<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>twitter oauth callback</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="social_controller.js.html">controller/social_controller.js</a>, <a href="social_controller.js.html#line97">line 97</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>next() callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> <dt> <h4 class="name" id="usePassport"><span class="type-signature"></span>usePassport<span class="signature">(req, res)</span><span class="type-signature"> &rarr; {function}</span></h4> </dt> <dd> <div class="description"> <p>uses passport to log users in, calls done(err,user) when complete, can define what credentials to check here</p> </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>req</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>res</code></td> <td class="type"> <span class="param-type">object</span> </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="passport_controller.js.html">controller/passport_controller.js</a>, <a href="passport_controller.js.html#line73">line 73</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>done(err,user) callback</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">function</span> </dd> </dl> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-authController.html">authController</a></li><li><a href="module-userloginController.html">userloginController</a></li><li><a href="login.html">login</a></li></ul><h3>Global</h3><ul><li><a href="global.html#facebook">facebook</a></li><li><a href="global.html#facebookcallback">facebookcallback</a></li><li><a href="global.html#instagram">instagram</a></li><li><a href="global.html#instagramcallback">instagramcallback</a></li><li><a href="global.html#saveUser">saveUser</a></li><li><a href="global.html#twitter">twitter</a></li><li><a href="global.html#twittercallback">twittercallback</a></li><li><a href="global.html#usePassport">usePassport</a></li></ul> </nav> <br clear="both"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Jan 29 2015 21:18:44 GMT-0500 (EST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>