5use \SimpleSAML_Auth_Source as Source;
 
    6use \SimpleSAML_Auth_State as State;
 
    7use \SimpleSAML_Configuration as Configuration;
 
    8use \SimpleSAML_Error_AuthSource as AuthSourceError;
 
   10use \SimpleSAML_Session as 
Session;
 
   11use \SimpleSAML\Utils\HTTP;
 
   43        $this->app_config = Configuration::getInstance()->getConfigItem(
'application', 
null);
 
   56        $as = Source::getById($this->authSource);
 
   58            throw new AuthSourceError($this->authSource, 
'Unknown authentication source.');
 
   74        $session = Session::getSessionFromRequest();
 
   76        return $session->isValid($this->authSource);
 
   96        $session = Session::getSessionFromRequest();
 
   98        if (
$session->isValid($this->authSource)) {
 
  124        if (array_key_exists(
'KeepPost', 
$params)) {
 
  125            $keepPost = (bool) 
$params[
'KeepPost'];
 
  130        if (array_key_exists(
'ReturnTo', 
$params)) {
 
  133            if (array_key_exists(
'ReturnCallback', 
$params)) {
 
  140        if (is_string(
$returnTo) && $keepPost && 
$_SERVER[
'REQUEST_METHOD'] === 
'POST') {
 
  144        if (array_key_exists(
'ErrorURL', 
$params)) {
 
  145            $errorURL = (string) 
$params[
'ErrorURL'];
 
  157            $params[State::RESTART] = $restartURL;
 
  196        assert(isset(
$params[
'ReturnTo']) || isset(
$params[
'ReturnCallback']));
 
  198        if (isset(
$params[
'ReturnStateParam']) || isset(
$params[
'ReturnStateStage'])) {
 
  199            assert(isset(
$params[
'ReturnStateParam'], 
$params[
'ReturnStateStage']));
 
  202        $session = Session::getSessionFromRequest();
 
  203        if (
$session->isValid($this->authSource)) {
 
  209            $session->doLogout($this->authSource);
 
  211            $params[
'LogoutCompletedHandler'] = array(get_class(), 
'logoutCompleted');
 
  213            $as = Source::getById($this->authSource);
 
  233        assert(isset(
$state[
'ReturnTo']) || isset(
$state[
'ReturnCallback']));
 
  235        if (isset(
$state[
'ReturnCallback'])) {
 
  240            if (isset(
$state[
'ReturnStateParam']) || isset(
$state[
'ReturnStateStage'])) {
 
  241                assert(isset(
$state[
'ReturnStateParam'], 
$state[
'ReturnStateStage']));
 
  242                $stateID = State::saveState(
$state, 
$state[
'ReturnStateStage']);
 
  267        $session = Session::getSessionFromRequest();
 
  268        return $session->getAuthData($this->authSource, 
'Attributes');
 
  281        assert(is_string(
$name));
 
  287        $session = Session::getSessionFromRequest();
 
  304        $session = Session::getSessionFromRequest();
 
  305        return $session->getAuthState($this->authSource);
 
  326            'AuthId'   => $this->authSource,
 
  351            'AuthId'   => $this->authSource,
 
  372            $url = HTTP::getSelfURL();
 
  375        $scheme = parse_url(
$url, PHP_URL_SCHEME);
 
  377        $port = parse_url(
$url, PHP_URL_PORT) ?: (
 
  381        $path = parse_url(
$url, PHP_URL_PATH) ?: 
'/';
 
  382        $query = parse_url(
$url, PHP_URL_QUERY) ?: 
'';
 
  383        $fragment = parse_url(
$url, PHP_URL_FRAGMENT) ?: 
'';
 
  385        $port = !empty($port) ? 
':'.$port : 
'';
 
  386        if (($scheme === 
'http' && $port === 
':80') || ($scheme === 
'https' && $port === 
':443')) {
 
  390        if (is_null($this->app_config)) {
 
  392            return $scheme.
'://'.$host.$port.$path.($query ? 
'?'.$query : 
'').($fragment ? 
'#'.$fragment : 
'');
 
  395        $base =  trim($this->app_config->getString(
 
  397            $scheme.
'://'.$host.$port
 
  399        return $base.$path.($query ? 
'?'.$query : 
'').($fragment ? 
'#'.$fragment : 
'');
 
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
if(!isset($_REQUEST['ReturnTo'])) $returnTo
An exception for terminatinating execution or to throw for unit testing.
"Manueller" Session-Fallback mit PHP4
logout($params=null)
Log the user out.
getAuthSource()
Retrieve the implementing authentication source.
getAuthDataArray()
Retrieve all authentication data.
getAttributes()
Retrieve attributes of the current user.
getAuthData($name)
Retrieve authentication data.
isAuthenticated()
Check if the user is authenticated.
requireAuth(array $params=array())
Require the user to be authenticated.
static logoutCompleted($state)
Called when logout operation completes.
getLogoutURL($returnTo=null)
Retrieve a URL that can be used to log the user out.
getLoginURL($returnTo=null)
Retrieve a URL that can be used to log the user in.
getProcessedURL($url=null)
Process a URL and modify it according to the application/baseURL configuration option,...
__construct($authSource)
Create an instance with the specified authsource.
login(array $params=array())
Start an authentication process.
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
static getServerPort()
Retrieve the port number from $_SERVER environment variables.
static getSelfHost()
Retrieve our own host.
static getServerHTTPS()
Retrieve HTTPS status from $_SERVER environment variables.
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
static getPOSTRedirectURL($destination, $data)
Create a link which will POST data.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']