habitica/documentation/docs/auth.html

79 lines
2.5 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>auth.js</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To &hellip;</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="api.html">
api.js
</a>
<a class="source" href="auth.html">
auth.js
</a>
<a class="source" href="pages.html">
pages.js
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>auth.js</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">&#182;</a>
</div>
</div>
<div class="content"><div class='highlight'><pre><span class="keyword">var</span> auth = require(<span class="string">'../controllers/auth'</span>);
<span class="keyword">var</span> express = require(<span class="string">'express'</span>);
<span class="keyword">var</span> router = <span class="keyword">new</span> express.Router();
<span class="comment">/* auth.auth*/</span>
auth.setupPassport(router); <span class="comment">//FIXME make this consistent with the others</span>
router.post(<span class="string">'/api/v1/register'</span>, auth.registerUser);
router.post(<span class="string">'/api/v1/user/auth/local'</span>, auth.loginLocal);
router.post(<span class="string">'/api/v1/user/auth/facebook'</span>, auth.loginFacebook);
router.post(<span class="string">'/api/v1/user/reset-password'</span>, auth.resetPassword);
router.post(<span class="string">'/api/v1/user/change-password'</span>, auth.auth, auth.changePassword);
module.exports = router;</pre></div></div>
</li>
</ul>
</div>
</body>
</html>