[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

:auth - :session issue

From: Mortimer Cladwell
Subject: :auth - :session issue
Date: Sun, 17 Jan 2021 10:43:32 -0500


I am using fix/ssql-guile3 branch on Debian 10 with PostgreSQL

Consider the controller/view:


(post "/auth"
 #:auth `(table person "lnuser" "passwd" "salt" ,my-hmac)
 #:session #t
 (lambda (rc)
   (let* (
 (results (:auth rc)))
     (view-render "test" (the-environment))

 results: <%= results %>

If I start with an empty sessions table and submit the login form with valid credentials I see in the view:

results: b29600ec9b7c131278b4b2ba366433b7

Looking in the sessions table:

lndb=# select * from sessions;
               sid                | data |            expires            |  client   | valid
 b29600ec9b7c131278b4b2ba366433b7 | ()   | Sun, 17 Jan 2021 16:32:01 GMT | |     1

From the manual I expect (:auth rc) to validate the user, and then I need to submit (:session rc 'spawn) to spawn a session.  Looks like the session is spawned with (:auth rc).  Also, I see the cookie in the browser console - "sid" with the value "b2960....".

If I submit invalid credentials - no session, no sid cookie.

Is this how it works now?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]