16        const AUTHID = 
'sspmod_multiauth_Auth_Source_MultiAuth.AuthId';
 
   21        const STAGEID = 
'sspmod_multiauth_Auth_Source_MultiAuth.StageId';
 
   26        const SOURCESID = 
'sspmod_multiauth_Auth_Source_MultiAuth.SourceId';
 
   45                assert(
'is_array($info)');
 
   46                assert(
'is_array($config)');
 
   51                if (!array_key_exists(
'sources', 
$config)) {
 
   52                        throw new Exception(
'The required "sources" config option was not found');
 
   56                $defaultLanguage = $globalConfiguration->getString(
'language.default', 
'en');
 
   58                $this->sources = array();
 
   66                        if (array_key_exists(
'text', 
$info)) {
 
   72                        if (array_key_exists(
'css-class', 
$info)) {
 
   73                                $css_class = 
$info[
'css-class'];
 
   76                                $authconfig = $authsources->getArray(
$source, NULL);
 
   77                                if (!array_key_exists(0, $authconfig) || !is_string($authconfig[0])) {
 
   80                                        $css_class = str_replace(
":", 
"-", $authconfig[0]);
 
   84                        $this->sources[] = array(
 
   87                                'css_class' => $css_class,
 
  105                assert(
'is_array($state)');
 
  119                if(isset(
$_GET[
'source'])) {
 
  142                assert(
'is_string($authId)');
 
  143                assert(
'is_array($state)');
 
  146                $valid_sources = array_map(
 
  148                                return $src[
'source'];
 
  152                if (
$as === NULL || !in_array(
$authId, $valid_sources, 
true)) {
 
  153                        throw new Exception(
'Invalid authentication source: ' . 
$authId);
 
  164                } 
catch (Exception $e) {
 
  180                assert(
'is_array($state)');
 
  188                        throw new Exception(
'Invalid authentication source during logout: ' . 
$source);
 
  203                assert(
'is_string($source)');
 
  210                        'lifetime' => (60*60*24*90),
 
  213                        'path' => 
$config->getBasePath(),
 
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
An exception for terminatinating execution or to throw for unit testing.
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
static redirectTrustedURL($url, $parameters=array())
This function redirects to the specified URL without performing any security checks.
static getById($authId, $type=null)
Retrieve authentication source.
static completeAuth(&$state)
Complete authentication.
static throwException($state, SimpleSAML_Error_Exception $exception)
Throw exception to the state exception handler.
static saveState(&$state, $stage, $rawId=false)
Save the state.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static getConfig($filename='config.php', $configSet='simplesaml')
Load a configuration file from a configuration set.
const DATA_TIMEOUT_SESSION_END
This is a timeout value for setData, which indicates that the data should never be deleted,...
static getSessionFromRequest()
Retrieves the current session.
const SOURCESID
The key where the sources is saved in the state.
authenticate(&$state)
Prompt the user with a list of authentication sources.
logout(&$state)
Log out from this authentication source.
$sources
Array of sources we let the user chooses among.
const AUTHID
The key of the AuthId field in the state.
static delegateAuthentication($authId, $state)
Delegate authentication.
getPreviousSource()
Get the previous authentication source.
setPreviousSource($source)
Set the previous authentication source.
const STAGEID
The string used to identify our states.
const SESSION_SOURCE
The key where the selected source is saved in the session.
__construct($info, $config)
Constructor for this authentication source.
if(!array_key_exists('StateId', $_REQUEST)) $id