title: OAuth2 server creation with nodejs
body: <p>I m actually studying REST Apis security, and it seems that many people are using OAuth2 and OpenId protocoles to manage authentication.</p>
  
  <p>I have tried to implement two OAuth2 server using :</p>
  
  <ul>
  <li><p><a href="http://passportjs.org/" rel="noreferrer">http://passportjs.org/</a> for the client side and <a href="https://github.com/jaredhanson/oauth2orize" rel="noreferrer">https://github.com/jaredhanson/oauth2orize</a> for the server side</p></li>
  <li><p><a href="https://www.npmjs.org/package/node-oauth2-server" rel="noreferrer">https://www.npmjs.org/package/node-oauth2-server</a></p></li>
  </ul>
  
  <p>For the first solution, running the examples is working correctly but I need to make something stateless (and in the example the author uses sessions...)</p>
  
  <p>Can you help me to create the simplest oauth2 server possible or defaultly explaining me the whole functionnement of these libraries ?</p>
  
  <p>Thanks for advance</p>