66        assert(
'is_string($id)');
 
   73        if (substr(
$id, 0, 6) === 
'saml2:') {
 
   77            $this->config = 
$metadata->getMetaDataConfig(substr(
$id, 6), 
'saml20-idp-hosted');
 
   78        } elseif (substr(
$id, 0, 6) === 
'saml1:') {
 
   82            $this->config = 
$metadata->getMetaDataConfig(substr(
$id, 6), 
'shib13-idp-hosted');
 
   83        } elseif (substr(
$id, 0, 5) === 
'adfs:') {
 
   87            $this->config = 
$metadata->getMetaDataConfig(substr(
$id, 5), 
'adfs-idp-hosted');
 
   91                $saml2EntityId = 
$metadata->getMetaDataCurrentEntityID(
'saml20-idp-hosted');
 
   92                $this->associationGroup = 
'saml2:'.$saml2EntityId;
 
   93            } 
catch (Exception $e) {
 
  100        if ($this->associationGroup === 
null) {
 
  104        $auth = $this->config->getString(
'auth');
 
  106            $this->authSource = new \SimpleSAML\Auth\Simple(
$auth);
 
  133        assert(
'is_string($id)');
 
  135        if (isset(self::$idpCache[
$id])) {
 
  136            return self::$idpCache[
$id];
 
  154        assert(
'isset($state["core:IdP"])');
 
  180        assert(
'is_string($assocId)');
 
  186        if ($prefix === 
'saml') {
 
  189            } 
catch (Exception $e) {
 
  192                } 
catch (Exception $e) {
 
  197            if ($prefix === 
'adfs') {
 
  206        } elseif (
$spMetadata->hasValue(
'OrganizationDisplayName')) {
 
  207            return $spMetadata->getLocalizedString(
'OrganizationDisplayName');
 
  221        assert(
'isset($association["id"])');
 
  222        assert(
'isset($association["Handler"])');
 
  239        return $session->getAssociations($this->associationGroup);
 
  250        assert(
'is_string($assocId)');
 
  264        return $this->authSource->isAuthenticated();
 
  275        assert(
'is_callable($state["Responder"])');
 
  277        if (isset(
$state[
'core:SP'])) {
 
  303        if (!
$idp->isAuthenticated()) {
 
  307        $state[
'Attributes'] = 
$idp->authSource->getAttributes();
 
  309        if (isset(
$state[
'SPMetadata'])) {
 
  315        if (isset(
$state[
'core:SP'])) {
 
  317            $previousSSOTime = 
$session->getData(
'core:idp-ssotime', 
$state[
'core:IdP'].
';'.
$state[
'core:SP']);
 
  318            if ($previousSSOTime !== 
null) {
 
  319                $state[
'PreviousSSOTimestamp'] = $previousSSOTime;
 
  327        $state[
'ReturnCall'] = array(
'SimpleSAML_IdP', 
'postAuthProc');
 
  331        $pc->processState(
$state);
 
  348        if (isset(
$state[
'isPassive']) && (
bool) 
$state[
'isPassive']) {
 
  352        $this->authSource->login(
$state);
 
  370        $sourceImpl = $this->authSource->getAuthSource();
 
  371        if ($sourceImpl === 
null) {
 
  375        $sourceImpl->reauthenticate(
$state);
 
  386        assert(
'isset($state["Responder"])');
 
  390        if (isset(
$state[
'SPMetadata'][
'entityid'])) {
 
  392        } elseif (isset(
$state[
'SPMetadata'][
'entityID'])) {
 
  400        if (isset(
$state[
'ForceAuthn']) && (
bool) 
$state[
'ForceAuthn']) {
 
  407        $state[
'IdPMetadata'] = $this->
getConfig()->toArray();
 
  408        $state[
'ReturnCallback'] = array(
'SimpleSAML_IdP', 
'postAuth');
 
  420        } 
catch (Exception $e) {
 
  437        $logouttype = $this->
getConfig()->getString(
'logouttype', 
'traditional');
 
  438        switch ($logouttype) {
 
  440                $handler = 
'SimpleSAML\IdP\TraditionalLogoutHandler';
 
  443                $handler = 
'SimpleSAML\IdP\IFrameLogoutHandler';
 
  462        assert(
'isset($state["Responder"])');
 
  481        assert(
'isset($state["Responder"])');
 
  482        assert(
'is_string($assocId) || is_null($assocId)');
 
  490            $session->deleteData(
'core:idp-ssotime', $this->
id.
':'.$state[
'saml:SPEntityId']);
 
  516        assert(
'is_string($assocId)');
 
  517        assert(
'is_string($relayState) || is_null($relayState)');
 
  538        assert(
'is_string($url)');
 
  541            'Responder'       => array(
'SimpleSAML_IdP', 
'finishLogoutRedirect'),
 
  542            'core:Logout:URL' => 
$url,
 
  560        assert(
'isset($state["core:Logout:URL"])');
 
$metadata['__DYNAMIC:1__']
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.
static getModuleURL($resource, array $parameters=array())
Get absolute URL to a specified module resource.
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 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.
Class SimpleSAML_Error_NoPassive.
static getByState(array &$state)
Retrieve the IdP "owning" the state.
authenticate(array &$state)
Authenticate the user.
terminateAssociation($assocId)
Remove an SP association.
static finishLogoutRedirect(SimpleSAML_IdP $idp, array $state)
Redirect to a URL after logout.
getId()
Retrieve the ID of this IdP.
isAuthenticated()
Is the current user authenticated?
static postAuth(array $state)
The user is authenticated.
handleLogoutRequest(array &$state, $assocId)
Process a logout request.
handleAuthenticationRequest(array &$state)
Process authentication requests.
getSPName($assocId)
Get SP name.
addAssociation(array $association)
Add an SP association.
getConfig()
Retrieve the configuration for this IdP.
getLogoutHandler()
Find the logout handler of this IdP.
reauthenticate(array &$state)
Re-authenticate the user.
__construct($id)
Initialize an IdP.
doLogoutRedirect($url)
Log out, then redirect to a URL.
getAssociations()
Retrieve list of SP associations.
handleLogoutResponse($assocId, $relayState, SimpleSAML_Error_Exception $error=null)
Process a logout response.
finishLogout(array &$state)
Finish the logout operation.
static postAuthProc(array $state)
Called after authproc has run.
static getById($id)
Retrieve an IdP by ID.
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.
if(!isset($associations[$assocId])) $association
if(!isset($_REQUEST['association'])) $assocId