Add a 14 day default session time rather than 24 hours.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 17 Jun 2011 00:05:32 +0000 (20:05 -0400)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 17 Jun 2011 00:05:32 +0000 (20:05 -0400)
planetlab/includes/plc_session.php

index 1afbc7a..4c42375 100644 (file)
@@ -58,13 +58,14 @@ class PLCSession
                              'AuthString' => $pass));
 
       // Authenticate user and get session key
                              'AuthString' => $pass));
 
       // Authenticate user and get session key
-      $session = $api->GetSession();
+      $seconds_to_expire = (24 * 60 * 60 * 14);
+      $session = $api->GetSession($seconds_to_expire);
       if (!$session) {
       if (!$session) {
-       return NULL;
+          return NULL;
       }
 
       // Change GetSession() at some point to return expires as well
       }
 
       // Change GetSession() at some point to return expires as well
-      $expires = time() + (24 * 60 * 60);
+      $expires = time() + $seconds_to_expire;
 
       // Change to session authentication
       $api->auth = array('AuthMethod' => "session", 'session' => $session);
 
       // Change to session authentication
       $api->auth = array('AuthMethod' => "session", 'session' => $session);