Skip to content
Snippets Groups Projects
Commit 40159f05 authored by Quentin CHEVALIER's avatar Quentin CHEVALIER
Browse files

Doc mineure

parent bdbab633
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: db/knex_router.js</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">Source: db/knex_router.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @file Charge la configuration knexjs adaptée à l'environnement (production ou développement) puis exporte un objet knex permettant les requêtes SQL
*/
const environment = process.env.NODE_ENV || 'development';
const config = require('../knexfile')[environment];
// console.log("Knex configuration:\n",config);
module.exports = require('knex')(config);</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
......@@ -105,7 +105,6 @@
<h4 class="name" id="Error404catcher"><span class="type-signature"></span>Error 404 catcher<span class="signature">()</span><span class="type-signature"></span></h4>
<<<<<<< HEAD
......@@ -155,7 +154,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_admin_view_admin_view.js.html">src/admin_view/admin_view.js</a>, <a href="src_admin_view_admin_view.js.html#line56">line 56</a>
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line89">line 89</a>
</li></ul></dd>
......@@ -190,8 +189,6 @@
<h4 class="name" id="Error404handler"><span class="type-signature"></span>Error 404 handler<span class="signature">()</span><span class="type-signature"></span></h4>
=======
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
......@@ -241,11 +238,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<<<<<<< HEAD
<a href="src_admin_view_admin_view.js.html">src/admin_view/admin_view.js</a>, <a href="src_admin_view_admin_view.js.html#line66">line 66</a>
=======
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line90">line 90</a>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line99">line 99</a>
</li></ul></dd>
......@@ -378,11 +371,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<<<<<<< HEAD
<a href="src_admin_view_admin_view.js.html">src/admin_view/admin_view.js</a>, <a href="src_admin_view_admin_view.js.html#line25">line 25</a>
=======
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line100">line 100</a>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line58">line 58</a>
</li></ul></dd>
......@@ -416,19 +405,11 @@
<<<<<<< HEAD
<h4 class="name" id="listGroups"><span class="type-signature"></span>listGroups<span class="signature">(uid)</span><span class="type-signature"> &rarr; {string}</span></h4>
<p class="summary"><p>Fonction qui retrouve les groupes du LDAP dont un individu est membre (pas de bind nécessaire)</p></p>
=======
<h4 class="name" id="KnexAPI:Gettable"><span class="type-signature"></span>Knex API: Get table<span class="signature">(table_name)</span><span class="type-signature"></span></h4>
<p class="summary"><p>Effectue une requête pour une table dans la BDD</p></p>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
......@@ -466,17 +447,13 @@
<tr>
<<<<<<< HEAD
<td class="name"><code>uid</code></td>
=======
<td class="name"><code>table_name</code></td>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
<td class="type">
<span class="param-type">string</span>
<span class="param-type">int</span>
......@@ -486,11 +463,7 @@
<<<<<<< HEAD
<td class="description last"><p>Identifiant de l'individu à interroger</p></td>
=======
<td class="description last"><p>La table voulue par l'utilisateur.</p></td>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</tr>
......@@ -531,11 +504,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<<<<<<< HEAD
<a href="src_ldap_data_ldap_data.js.html">src/ldap_data/ldap_data.js</a>, <a href="src_ldap_data_ldap_data.js.html#line17">line 17</a>
=======
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line59">line 59</a>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</li></ul></dd>
......@@ -558,7 +527,6 @@
<<<<<<< HEAD
<h5>Returns:</h5>
......@@ -581,8 +549,6 @@
</dl>
=======
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
......@@ -594,7 +560,6 @@
<<<<<<< HEAD
<h4 class="name" id="listMembers"><span class="type-signature"></span>listMembers<span class="signature">(uid)</span><span class="type-signature"> &rarr; {string}</span></h4>
......@@ -607,16 +572,6 @@
<div class="description">
<p>TBM</p>
</div>
=======
<h4 class="name" id="listGroups"><span class="type-signature"></span>listGroups<span class="signature">(uid, passwd)</span><span class="type-signature"> &rarr; {string}</span></h4>
<p class="summary"><p>Fonction qui retrouve les groupes où une personne est membre</p></p>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
......@@ -652,32 +607,6 @@
<tr>
<td class="name"><code>uid</code></td>
<<<<<<< HEAD
=======
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last"><p>Identifiant de la personne à interroger</p></td>
</tr>
<tr>
<td class="name"><code>passwd</code></td>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
<td class="type">
......@@ -693,11 +622,7 @@
<<<<<<< HEAD
<td class="description last"><p>Identifiant du groupe à interrogeant (pour des raisons d'identification)</p></td>
=======
<td class="description last"><p>Mdp de la personne à interroger</p></td>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</tr>
......@@ -738,11 +663,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<<<<<<< HEAD
<a href="src_ldap_data_ldap_data.js.html">src/ldap_data/ldap_data.js</a>, <a href="src_ldap_data_ldap_data.js.html#line38">line 38</a>
=======
<a href="src_ldap_data_ldap_data.js.html">src/ldap_data/ldap_data.js</a>, <a href="src_ldap_data_ldap_data.js.html#line18">line 18</a>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</li></ul></dd>
......@@ -808,21 +729,13 @@
</div>
<nav>
<<<<<<< HEAD
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
=======
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</nav>
<br class="clear">
<footer>
<<<<<<< HEAD
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:49:00 GMT+0100 (Paris, Madrid)
=======
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -54,7 +54,7 @@
<header>
<h2>knexfile.js</h2>
<h2>db/knex_router.js</h2>
</header>
......@@ -63,7 +63,7 @@
<div class="container-overview">
<div class="description"><p>knexfile est un fichier de configuration requis par le module knexjs. Il permet de spécifier le mode de communication avec la BDD, et comprend identifiants et mots de passe.</p></div>
<div class="description"><p>Charge la configuration knexjs adaptée à l'environnement (production ou développement) puis exporte un objet knex permettant les requêtes SQL</p></div>
......@@ -88,13 +88,6 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Will Jallet</li>
</ul>
</dd>
......@@ -105,7 +98,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="knexfile.js.html">knexfile.js</a>, <a href="knexfile.js.html#line1">line 1</a>
<a href="db_knex_router.js.html">db/knex_router.js</a>, <a href="db_knex_router.js.html#line1">line 1</a>
</li></ul></dd>
......@@ -154,7 +147,7 @@
<header>
<h2>src/admin_view/admin_view.js</h2>
<h2>knexfile.js</h2>
</header>
......@@ -163,7 +156,7 @@
<div class="container-overview">
<div class="description"><p>admin_view</p></div>
<div class="description"><p>knexfile est un fichier de configuration requis par le module knexjs. Il permet de spécifier le mode de communication avec la BDD, et comprend identifiants et mots de passe.</p></div>
......@@ -188,98 +181,12 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_admin_view_admin_view.js.html">src/admin_view/admin_view.js</a>, <a href="src_admin_view_admin_view.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
</div>
</article>
</section>
<section>
<header>
<h2>src/index.js</h2>
</header>
<article>
<div class="container-overview">
<div class="description"><p>index</p></div>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Will Jallet</li>
</ul>
</dd>
......@@ -291,7 +198,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_index.js.html">src/index.js</a>, <a href="src_index.js.html#line6">line 6</a>
<a href="knexfile.js.html">knexfile.js</a>, <a href="knexfile.js.html#line1">line 1</a>
</li></ul></dd>
......@@ -340,7 +247,7 @@
<header>
<h2>src/ldap_data/ldap_data.js</h2>
<h2>src/admin_view/admin_router.js</h2>
</header>
......@@ -349,7 +256,7 @@
<div class="container-overview">
<div class="description"><p>Ce fichier gère les requêtes LDAP de type données ; liste des groupe d'un individu, liste des membres d'un groupe... A ne pas confondre avec ldap_auth qui lui gère l'authentification.</p></div>
<div class="description"><p>Interface &quot;administrateur&quot; de l'acces aux BDD. S'appuie sur css et views.</p></div>
......@@ -374,13 +281,6 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>hawkspar</li>
</ul>
</dd>
......@@ -391,7 +291,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_ldap_data_ldap_data.js.html">src/ldap_data/ldap_data.js</a>, <a href="src_ldap_data_ldap_data.js.html#line1">line 1</a>
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line1">line 1</a>
</li></ul></dd>
......@@ -440,7 +340,7 @@
<header>
<h2>src/server.js</h2>
<h2>src/index.js</h2>
</header>
......@@ -449,7 +349,7 @@
<div class="container-overview">
<div class="description"><p>server.js</p></div>
<div class="description"><p>Entry point de webpack</p></div>
......@@ -484,7 +384,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_server.js.html">src/server.js</a>, <a href="src_server.js.html#line11">line 11</a>
<a href="src_index.js.html">src/index.js</a>, <a href="src_index.js.html#line1">line 1</a>
</li></ul></dd>
......@@ -533,7 +433,7 @@
<header>
<h2>src/admin_view/admin_router.js</h2>
<h2>src/ldap_auth/ldap_auth.js</h2>
</header>
......@@ -542,7 +442,7 @@
<div class="container-overview">
<div class="description"><p>admin_router</p></div>
<div class="description"><p>Ce fichier gère les authentifications avec le LDAP précisé dans config.json.</p></div>
......@@ -567,6 +467,13 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Wangounet</li>
</ul>
</dd>
......@@ -577,7 +484,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_admin_view_admin_router.js.html">src/admin_view/admin_router.js</a>, <a href="src_admin_view_admin_router.js.html#line1">line 1</a>
<a href="src_ldap_auth_ldap_auth.js.html">src/ldap_auth/ldap_auth.js</a>, <a href="src_ldap_auth_ldap_auth.js.html#line11">line 11</a>
</li></ul></dd>
......@@ -626,7 +533,7 @@
<header>
<h2>src/index.js</h2>
<h2>src/ldap_auth/ldap_auth.js</h2>
</header>
......@@ -635,7 +542,7 @@
<div class="container-overview">
<div class="description"><p>index</p></div>
<div class="description"><p>ldap_auth</p></div>
......@@ -670,7 +577,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_index.js.html">src/index.js</a>, <a href="src_index.js.html#line1">line 1</a>
<a href="src_ldap_auth_ldap_auth.js.html">src/ldap_auth/ldap_auth.js</a>, <a href="src_ldap_auth_ldap_auth.js.html#line1">line 1</a>
</li></ul></dd>
......@@ -719,7 +626,7 @@
<header>
<h2>src/ldap_auth/ldap_auth.js</h2>
<h2>src/ldap_data/ldap_data.js</h2>
</header>
......@@ -728,7 +635,7 @@
<div class="container-overview">
<div class="description"><p>ldap_auth</p></div>
<div class="description"><p>Ce fichier gère les requêtes LDAP de type données ; liste des groupe d'un individu, liste des membres d'un groupe... A ne pas confondre avec ldap_auth qui lui gère l'authentification.</p></div>
......@@ -753,6 +660,13 @@
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>hawkspar</li>
</ul>
</dd>
......@@ -763,7 +677,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="src_ldap_auth_ldap_auth.js.html">src/ldap_auth/ldap_auth.js</a>, <a href="src_ldap_auth_ldap_auth.js.html#line1">line 1</a>
<a href="src_ldap_data_ldap_data.js.html">src/ldap_data/ldap_data.js</a>, <a href="src_ldap_data_ldap_data.js.html#line1">line 1</a>
</li></ul></dd>
......@@ -821,7 +735,7 @@
<div class="container-overview">
<div class="description"><p>server.js</p></div>
<div class="description"><p>Cree le serveur express avec tous les middleware qui vont bien</p></div>
......@@ -901,21 +815,13 @@
</div>
<nav>
<<<<<<< HEAD
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
=======
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</nav>
<br class="clear">
<footer>
<<<<<<< HEAD
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:49:00 GMT+0100 (Paris, Madrid)
=======
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -66,21 +66,13 @@ module.exports = {
</div>
<nav>
<<<<<<< HEAD
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
=======
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</nav>
<br class="clear">
<footer>
<<<<<<< HEAD
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:49:00 GMT+0100 (Paris, Madrid)
=======
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -27,8 +27,7 @@
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @file admin_router
* @summary Interface "administrateur" de l'acces aux BDD
* @file Interface "administrateur" de l'acces aux BDD. S'appuie sur css et views.
*/
import express from 'express';
......@@ -129,7 +128,6 @@ router.use((req, res, next) => {
* @function Error 404 handler
* @summary Gère les erreurs 404
*/
router.use((err, req, res, next) => {
res.locals.message = err.message;
......@@ -152,13 +150,13 @@ export default router;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -26,28 +26,8 @@
<section>
<article>
<<<<<<< HEAD
<pre class="prettyprint source linenums"><code>import server from './server';
import router from './admin_view/admin_view';
import colors from 'colors';
import path from 'path';
/**
* @file index
* @summary Entry point de webpack
*
*/
server.use(router);
let port = process.env.PORT || 3000;
server.listen(port, () => {
console.log(colors.blue(`Express server listening on port ${port}`));
});</code></pre>
=======
<pre class="prettyprint source linenums"><code>/**
* @file index
* @summary Entry point de webpack. Finit de setup le server avec ./ldap_auth et ./admin_view
* @file Entry point de webpack
*/
import server from './server';
......@@ -71,7 +51,6 @@ server.listen(port, () => {
console.log(colors.blue(`Express server listening on port ${port}`));
});
</code></pre>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</article>
</section>
......@@ -81,21 +60,13 @@ server.listen(port, () => {
</div>
<nav>
<<<<<<< HEAD
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
=======
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</nav>
<br class="clear">
<footer>
<<<<<<< HEAD
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:49:00 GMT+0100 (Paris, Madrid)
=======
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -28,13 +28,19 @@
<article>
<pre class="prettyprint source linenums"><code>/**
* @file ldap_auth
* @summary Configuration de l'authentification LDAP du backend via passport-ldap
* @summary Setup de l'auth ldap avec passport-ldapauth
*/
import passport from 'passport';
import LdapStrategy from 'passport-ldapauth';
import session from 'express-session';
import fs from 'fs';
/**
* @file Ce fichier gère les authentifications avec le LDAP précisé dans config.json.
* @author Wangounet
*/
function setupLdapAuth(server) {
var config = JSON.parse(fs.readFileSync('config.json', 'utf8'));
......@@ -79,13 +85,13 @@ export default setupLdapAuth;
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -26,7 +26,6 @@
<section>
<article>
<<<<<<< HEAD
<pre class="prettyprint source linenums"><code>/**
* @file Ce fichier gère les requêtes LDAP de type données ; liste des groupe d'un individu, liste des membres d'un groupe... A ne pas confondre avec ldap_auth qui lui gère l'authentification.
* @author hawkspar
......@@ -34,31 +33,14 @@
var ensureLoggedin = require('connect-ensure-login').ensureLoggedIn;
var ldapescape = require("ldap-escape");
=======
<pre class="prettyprint source linenums"><code>var ensureLoggedin = require('connect-ensure-login').ensureLoggedIn;
var ldapescape = require("ldap-escape");
//var Fuse = require("fuse.js");
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
var ldap = require('ldapjs');
var client = ldap.createClient({ url: "ldap://frankiz.eleves.polytechnique.fr", timeout: 10000, idleTimeout: 10000});
<<<<<<< HEAD
/**
* @summary Fonction qui retrouve les groupes du LDAP dont un individu est membre (pas de bind nécessaire)
* @arg {int} uid - Identifiant de l'individu à interroger
* @return {string} Liste des uid de groupes (noms flat des groupes) où l'id fourni
=======
// Pas nécessaire normalement car fait dans ldap_auth.js ; ici pour des besoins de debug
function handshake(uid, passwd) { client.bind("uid=${uid},ou=eleves,dc=frankiz,dc=net",passwd, (err) => { console.log(err); }); }
/**
* @summary Fonction qui retrouve les groupes une personne est membre
* @arg {int} uid - Identifiant de la personne à interroger
* @arg {string} passwd - Mdp de la personne à interroger
* @return {string} Liste des uid de groupes l'id fournie est membre (noms flat des groupes)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
*/
function listGroups(uid) {
return new Promise(function(resolve, reject) {
......@@ -74,7 +56,6 @@ function listGroups(uid) {
});
});
}
<<<<<<< HEAD
/**
* TBM
......@@ -84,21 +65,6 @@ function listGroups(uid) {
*/
function listMembers(uid) {
client.bind("uid=${uid},ou=eleves,dc=frankiz,dc=net", (err) => { console.log(err); });
=======
// Synthaxe d'utilisation
handshake("user","xxx");
listGroups("user","xxx").then((grList) => { console.log(grList); });
/**
* @summary Fonction qui retrouve la liste des membres d'un binet
* @arg {int} uid - Identifiant de la personne interrogeant (pour des raisons d'identification)
* @arg {string} passwd - Mdp de la personne à interroger
* @return {string} Liste des uid de groupes l'id fournie est membre (noms flat des groupes)
function listGroups(uid,passwd) {
client.bind("uid=${uid},ou=eleves,dc=frankiz,dc=net",passwd, (err) => { console.log(err); });
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
return new Promise(function(resolve, reject) {
var groupsList=[];
......@@ -112,14 +78,10 @@ function listGroups(uid,passwd) {
}
});
});
<<<<<<< HEAD
}
// Synthaxe d'utilisation
listGroups("quentin.chevalier","Ie42fds'eaJm1").then((grList) => { console.log(grList); });</code></pre>
=======
}*/</code></pre>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</article>
</section>
......@@ -129,21 +91,13 @@ listGroups("quentin.chevalier","Ie42fds'eaJm1").then((grList) => { console.log(g
</div>
<nav>
<<<<<<< HEAD
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
=======
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</nav>
<br class="clear">
<footer>
<<<<<<< HEAD
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:49:00 GMT+0100 (Paris, Madrid)
=======
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
......@@ -37,9 +37,7 @@ import { graphqlExpress, graphiqlExpress } from 'graphql-server-express';
import { makeExecutableSchema } from 'graphql-tools';
/**
* @file server.js
* @summary Cree le serveur express avec tous les middleware qui vont bien
*
* @file Cree le serveur express avec tous les middleware qui vont bien
*/
const server = express();
......@@ -71,17 +69,11 @@ const typeDefs = `
}
type Group {
<<<<<<< HEAD
name: String
id: Int
school: String
=======
name: String!
id: ID!
updatedAt: String!
description: String
school: String!
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
}
`;
......@@ -112,21 +104,13 @@ export default server;
</div>
<nav>
<<<<<<< HEAD
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li><li><a href="global.html#listMembers">listMembers</a></li></ul>
=======
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#Error404catcher">Error 404 catcher</a></li><li><a href="global.html#Error404handler">Error 404 handler</a></li><li><a href="global.html#KnexAPI:Gettable">Knex API: Get table</a></li><li><a href="global.html#listGroups">listGroups</a></li></ul>
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
</nav>
<br class="clear">
<footer>
<<<<<<< HEAD
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:49:00 GMT+0100 (Paris, Madrid)
=======
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 09:35:38 GMT+0100 (Romance Standard Time)
>>>>>>> 65d345b0b615581fa3cae6fa778b938f07bb4cf4
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Feb 28 2018 10:15:16 GMT+0100 (Paris, Madrid)
</footer>
<script> prettyPrint(); </script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment