From e8ab7d1360b7dcf6c3a3ffbc85755480a9543711 Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Mon, 19 Jan 2015 12:22:48 +0100 Subject: [PATCH] Remove remainingTime() from SimpleSAML_Session. --- lib/SimpleSAML/Session.php | 18 ------------------ modules/oauth/www/authorize.php | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index e4487eff2..d6455cb82 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -536,24 +536,6 @@ class SimpleSAML_Session { } - /** - * If the user is authenticated, how much time is left of the session. - * - * @return int The number of seconds until the session expires. - * @deprecated - */ - public function remainingTime() { - - if (!isset($this->authData[$this->authority])) { - /* Not authenticated. */ - return -1; - } - - assert('isset($this->authData[$this->authority]["Expire"])'); - return $this->authData[$this->authority]['Expire'] - time(); - } - - /** * Retrieve the attributes associated with this session. * diff --git a/modules/oauth/www/authorize.php b/modules/oauth/www/authorize.php index b8e5bf3b7..79eba5ded 100644 --- a/modules/oauth/www/authorize.php +++ b/modules/oauth/www/authorize.php @@ -68,7 +68,7 @@ try { $t = new SimpleSAML_XHTML_Template($config, 'oauth:authorized.php'); $t->data['header'] = '{status:header_saml20_sp}'; - $t->data['remaining'] = $session->remainingTime(); + $t->data['remaining'] = $session->getAuthData($as, "Expire") - time(); $t->data['sessionsize'] = $session->getSize(); $t->data['attributes'] = $attributes; $t->data['logouturl'] = SimpleSAML_Utilities::selfURLNoQuery() . '?logout'; -- GitLab