opentrials / opentrials-early-poc

A very early POC app for OpenTrials, just using a single source of data on schizophrenia.
MIT License
1 stars 0 forks source link

Add a protected "access code" middleware #17

Closed pwalsh closed 9 years ago

pwalsh commented 9 years ago

Implementation

We need to protect the prototype because of the status of the data we are using. A simple way to implement this without a database would be to have a single "access code" that a user has to enter in order to see any pages of the app.

Once the user enters the correct access code, then a value is set to allow that user for 24 hours. So, we need a session, and we can use a cookie-based session for this purpose. See here for use of cookies for session storage in Node

Tasks

pwalsh commented 9 years ago

FIXED.