Skip to content
Snippets Groups Projects
Commit b8724609 authored by Jaime Perez's avatar Jaime Perez
Browse files

Mark as deprecated in SimpleSAML_Session: DATA_TIMEOUT_LOGOUT, $authority,...

Mark as deprecated in SimpleSAML_Session: DATA_TIMEOUT_LOGOUT, $authority, getAuthority(), getAuthnRequest(), setAuthnRequest(), setIdP(), getIdP(), setSessionIndex(), getSessionIndex(), setNameID(), getNameID(), setSessionDuration(), remainingTime(), isAuthenticated(), getAuthnInstant(), getAttributes(), getAttribute(), setAttributes(), getSize(), expiraDataLogout(), setLogoutState(), getLogoutState().
parent 2635c663
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ class SimpleSAML_Session {
/**
* This is a timeout value for setData, which indicates that the data should be deleted
* on logout.
* @deprecated
*/
const DATA_TIMEOUT_LOGOUT = 'logoutTimeout';
......@@ -70,6 +71,9 @@ class SimpleSAML_Session {
private $trackid = 0;
/**
* @deprecated
*/
private $authority = null;
......@@ -290,6 +294,7 @@ class SimpleSAML_Session {
* Who authorized this session. Could be for example 'saml2', 'shib13', 'login', 'login-admin' etc.
*
* @return string Who authorized this session.
* @deprecated
*/
public function getAuthority() {
return $this->authority;
......@@ -306,6 +311,7 @@ class SimpleSAML_Session {
* @throws Exception If the method can't find a cached version of the request.
* @return array Returns an assoc array of cached variables associated with the
* authentication request.
* @deprecated
*/
public function getAuthnRequest($protocol, $requestid) {
......@@ -335,6 +341,7 @@ class SimpleSAML_Session {
* @param string $protocol 'saml2' or 'shib13'
* @param string $requestid The request id used as a key to lookup the cache.
* @param array $cache The assoc array that will be stored.
* @deprecated
*/
public function setAuthnRequest($protocol, $requestid, array $cache) {
......@@ -350,6 +357,7 @@ class SimpleSAML_Session {
* Set the IdP we are authenticated against.
*
* @param string|NULL $idp Our current IdP, or NULL if we aren't authenticated with an IdP.
* @deprecated
*/
public function setIdP($idp) {
assert('is_string($idp) || is_null($idp)');
......@@ -370,6 +378,7 @@ class SimpleSAML_Session {
* Retrieve the IdP we are currently authenticated against.
*
* @return string|NULL Our current IdP, or NULL if we aren't authenticated with an IdP.
* @deprecated
*/
public function getIdP() {
if (!isset($this->authData[$this->authority]['saml:sp:IdP'])) {
......@@ -383,6 +392,7 @@ class SimpleSAML_Session {
* Set the SessionIndex we received from our IdP.
*
* @param string|NULL $sessionindex Our SessionIndex.
* @deprecated
*/
public function setSessionIndex($sessionindex) {
assert('is_string($sessionindex) || is_null($sessionindex)');
......@@ -402,6 +412,7 @@ class SimpleSAML_Session {
* Retrieve our SessionIndex.
*
* @return string|NULL Our SessionIndex.
* @deprecated
*/
public function getSessionIndex() {
if (!isset($this->authData[$this->authority]['saml:sp:SessionIndex'])) {
......@@ -415,6 +426,7 @@ class SimpleSAML_Session {
* Set our current NameID.
*
* @param array|NULL $nameid The NameID we received from the IdP
* @deprecated
*/
public function setNameID($nameid) {
assert('is_array($nameid) || is_null($nameid)');
......@@ -434,6 +446,7 @@ class SimpleSAML_Session {
* Get our NameID.
*
* @return array|NULL The NameID we received from the IdP.
* @deprecated
*/
public function getNameID() {
if (!isset($this->authData[$this->authority]['saml:sp:NameID'])) {
......@@ -613,6 +626,7 @@ class SimpleSAML_Session {
* Set the lifetime of our current authentication session.
*
* @param int $duration The number of seconds this authentication session is valid.
* @deprecated
*/
public function setSessionDuration($duration) {
assert('is_int($duration)');
......@@ -656,6 +670,7 @@ 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() {
......@@ -672,6 +687,7 @@ class SimpleSAML_Session {
* Is the user authenticated. This function does not check the session duration.
*
* @return bool TRUE if the user is authenticated, FALSE otherwise.
* @deprecated
*/
public function isAuthenticated() {
return isset($this->authData[$this->authority]);
......@@ -682,6 +698,7 @@ class SimpleSAML_Session {
* Retrieve the time the user was authenticated.
*
* @return int|NULL The timestamp for when the user was authenticated. NULL if the user hasn't authenticated.
* @deprecated
*/
public function getAuthnInstant() {
......@@ -699,6 +716,7 @@ class SimpleSAML_Session {
* Retrieve the attributes associated with this session.
*
* @return array|NULL The attributes.
* @deprecated
*/
public function getAttributes() {
if (!isset($this->authData[$this->authority]['Attributes'])) {
......@@ -713,6 +731,7 @@ class SimpleSAML_Session {
*
* @param string $name The name of the attribute.
* @return array|NULL The values of the given attribute.
* @deprecated
*/
public function getAttribute($name) {
if (!isset($this->authData[$this->authority]['Attributes'][$name])) {
......@@ -726,6 +745,7 @@ class SimpleSAML_Session {
* Set the attributes for this session.
*
* @param array|NULL $attributes The attributes of this session.
* @deprecated
*/
public function setAttributes($attributes) {
assert('isset($this->authData[$this->authority])');
......@@ -753,6 +773,7 @@ class SimpleSAML_Session {
* Calculates the size of the session object after serialization
*
* @return int The size of the session measured in bytes.
* @deprecated
*/
public function getSize() {
$s = serialize($this);
......@@ -854,6 +875,7 @@ class SimpleSAML_Session {
/**
* This function deletes data which should be deleted on logout from the data store.
* @deprecated
*/
private function expireDataLogout() {
......@@ -1116,6 +1138,7 @@ class SimpleSAML_Session {
* Set the logout state for this session.
*
* @param array $state The state array.
* @deprecated
*/
public function setLogoutState(array $state) {
assert('isset($this->authData[$this->authority])');
......@@ -1129,6 +1152,7 @@ class SimpleSAML_Session {
* Retrieve the logout state for this session.
*
* @return array The logout state. If no logout state is set, an empty array will be returned.
* @deprecated
*/
public function getLogoutState() {
assert('isset($this->authData[$this->authority])');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment