Skip to content
Snippets Groups Projects
Commit a7155085 authored by Olav Morken's avatar Olav Morken
Browse files

Auth_Simple: Add getAuthData() and getAuthDataArray() functions.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2641 44740490-163a-0410-bde0-09ae8108e29a
parent 3bfb7e2d
No related branches found
No related tags found
No related merge requests found
......@@ -179,6 +179,40 @@ class SimpleSAML_Auth_Simple {
}
/**
* Retrieve authentication data.
*
* @param string $name The name of the parameter, e.g. 'Attribute', 'Expire' or 'saml:sp:IdP'.
* @return mixed|NULL The value of the parameter, or NULL if it isn't found or we are unauthenticated.
*/
public function getAuthData($name) {
assert('is_string($name)');
if (!$this->isAuthenticated()) {
return NULL;
}
$session = SimpleSAML_Session::getInstance();
return $session->getAuthData($this->authSource, $name);
}
/**
* Retrieve all authentication data.
*
* @return array|NULL All persistent authentication data, or NULL if we aren't authenticated.
*/
public function getAuthDataArray() {
if (!$this->isAuthenticated()) {
return NULL;
}
$session = SimpleSAML_Session::getInstance();
return $session->getAuthState($this->authSource);
}
/**
* Retrieve an URL that can be used to log the user in.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment