chiark / gitweb /
Docs: Clarify url_with_query_params $params
[cgi-auth-flexible.git] / junk
1  if ( form submission is login request ) {
2      check login details, if wrong print error and quit
3      $authreq->record_login(...username...);
4  }
5  if ( !$authreq->check() ) {
6      display login form, quit
7
8
9  if ( form submission is login request ) {
10      check login details, if wrong print error and quit
11      $authreq->record_login(...username...);
12  }
13  if ( form submission is logout request ) {
14      die unless $authreq->mutate();
15      my $logged_out_user = $authreq->logout();
16      if (!defined $logged_out_user) {
17          print "you are not logged in" error and quit
18      } else {
19          print "goodbye $username you are now logged out" and quit
20      }
21  }
22  if ( !$authreq->check() ) {
23      display login form, quit
24
25
26 advantages of cookie
27  - user can sort of log out by clearing cookies
28  - sophisticated applications can have get-requests
29
30