PyJaipur / PyJudge

Simple Programming Contest hosting software
MIT License
17 stars 29 forks source link

Session support #117

Closed theSage21 closed 5 years ago

theSage21 commented 5 years ago

There are two problems with the system right now.

  1. A person should not have to insert their username again and again
  2. If someone solves a question, they have no way of automatically proving that they solved it (someone else could have submitted on their name)

A simple/bare bones solution for this is to have something called a session:

Asking for these pairs again and again becomes irritating very quickly. Instead what we do is:

Implementation

  1. login/registration/logout api
  2. login sets a cookie with a random number in the cookie
  3. everyone uses cookies to verify identity by looking up in some data structure (dict maybe?)
  4. logout un-sets the cookie