chiark / gitweb /
wip some decisions
[cgi-auth-flexible.git] / DESIGN
1 cookie
2   user assoc id
3
4 hidden form parameter
5   user assoc id
6
7 same or different ?
8
9 unused session expiry ?
10
11
12 logged in user associations database
13
14 user login details form
15
16 user authentication form
17
18 user is abstract ?
19   string suitable for database
20   not interpreted by session code
21
22
23
24 app needs to first check is it a login form submission
25 if so check details
26 if ok then call
27   create new login assoc(username)
28   which returns a cookie to set
29
30 check function
31   checks for assoc id in cookie and form
32   if assoc id in cookie and op is GET, allow
33   otherwise demand in form too
34   checks for timeout too of course
35
36 if failure, app must show login form
37
38 app needs to check for logout button submission
39   if so then call
40   delete this login
41     which mostly does what check does and then also deletes the
42     assoc and the cookie
43
44
45
46 ----------------------------------------
47
48 DECISONS
49 clearing cookies does log out?
50 no persistent cookie?
51 allow read-only post/get distinction?
52
53 does not support persistent cookie, as that needs two db entries etc.
54  two cookies complicated api
55
56 clearing cookies always logs out