Negate established flag if session is expired.
authordavisd123 <davisd123@users.noreply.github.com>
Thu, 1 Oct 2015 04:50:06 +0000 (14:20 +0930)
committerSimo Sorce <simo@redhat.com>
Mon, 5 Oct 2015 14:23:27 +0000 (10:23 -0400)
If the session is expired, then set established to false to
force re-authentication.

Reviewed-by: Simo Sorce <simo@redhat.com>
Close #57

src/sessions.c

index 70f39a2..1554d24 100644 (file)
@@ -157,6 +157,7 @@ void mag_check_session(struct mag_req_cfg *cfg, struct mag_conn **conn)
     expiration = gsessdata->expiration;
     if (expiration < time(NULL)) {
         /* credentials fully expired, return nothing */
+        mc->established = false;
         goto done;
     }