当前位置: 首页>>代码示例>>PHP>>正文


PHP SimpleSAML_Auth_Simple::getLogoutURL方法代码示例

本文整理汇总了PHP中SimpleSAML_Auth_Simple::getLogoutURL方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleSAML_Auth_Simple::getLogoutURL方法的具体用法?PHP SimpleSAML_Auth_Simple::getLogoutURL怎么用?PHP SimpleSAML_Auth_Simple::getLogoutURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleSAML_Auth_Simple的用法示例。


在下文中一共展示了SimpleSAML_Auth_Simple::getLogoutURL方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    $user_id = '';
    $user_nick = '';
    $osm_user = '';
    if (isset($attr["id"])) {
        $user_id = $attr["id"][0];
    }
    if (isset($attr["nick"])) {
        $user_nick = $attr["nick"][0];
    }
    if (isset($attr["osm_user"])) {
        $logged = true;
    }
}
if ($logged) {
    echo "Přihlášen jako " . $user_nick . " - ";
    echo "<a href=\"" . $auth->getLogoutURL() . "\">odhlásit</a>";
}
$f_query = 0;
// zda zobrazit vysledek nebo jen formular
$f_uid = 0;
// uid
$f_zmeny = 0;
// jen v RUIAN zmenene
$f_okres = 0;
// okres
$sort = 0;
if (isset($_REQUEST['sort'])) {
    $sort = $_REQUEST['sort'];
}
if (!is_numeric($sort)) {
    die;
开发者ID:osmcz,项目名称:poloha.net_websites,代码行数:31,代码来源:index2.php

示例2: samlAction

 public function samlAction()
 {
     require_once SamlAuth::LIB_AUTOLOAD;
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     //In case of external service using AppDB as a SP
     if (isset($_GET['callbackUrl']) && trim($_GET['callbackUrl']) !== '') {
         $this->session->authreferer = trim($_GET['callbackUrl']);
     } else {
         if (isset($this->session->authreferer) === false) {
             $this->session->authreferer = $_SERVER["HTTP_REFERER"];
         }
     }
     $source = $this->_getParam("source");
     if ($source == null) {
         $source = "";
     }
     //Check if user is already logged in
     if (SamlAuth::isAuthenticated() !== false) {
         if (isset($this->session->authreferer) && trim($this->session->authreferer) !== "") {
             $this->session->authreferer = str_replace("http://", "https://", $this->session->authreferer);
             header("Location: " . $this->session->authreferer);
         } else {
             header("Location: " . "https://" . $_SERVER['HTTP_HOST']);
         }
         return;
     } else {
         if (isset($this->session) && $this->session->isNewUser === true) {
             header("Location: " . "https://" . $_SERVER['HTTP_HOST']);
             return;
         }
     }
     $config = SimpleSAML_Configuration::getInstance();
     $t = new SimpleSAML_XHTML_Template($config, 'core:authsource_list.tpl.php');
     $t->data['sources'] = SimpleSAML_Auth_Source::getSourcesMatch('-sp');
     if (!in_array($source, $t->data['sources'])) {
         header("Location: " . "https://" . $_SERVER['HTTP_HOST']);
         exit;
     }
     $as = new SimpleSAML_Auth_Simple($source);
     if (!$as->isAuthenticated()) {
         $as->requireAuth();
     }
     $attributes = $as->getAttributes();
     $uid = $attributes['idp:uid'][0];
     $_SESSION['identity'] = $uid;
     $_SESSION['logouturl'] = $as->getLogoutURL();
     $this->session->samlattrs = $attributes;
     $this->session->samlauthsource = $source;
     $this->_helper->redirector('postauth');
 }
开发者ID:IASA-GR,项目名称:appdb-core,代码行数:51,代码来源:SamlController.php

示例3: ceil

$template->data['userid'] = $userid;
$template->data['user'] = $userController->getUser();
$template->data['security.context'] = sspmod_janus_DiContainer::getInstance()->getSecurityContext();
/* START TAB MESSAGE PROVISIONING *************************************************************************************/
if ($selectedtab == SELECTED_TAB_MESSAGE) {
    $template->data['user_type'] = $user->getType();
    $template->data['subscriptions'] = $subscriptions;
    $template->data['subscriptionList'] = $subscriptionList;
    $template->data['messages'] = $messages;
    $template->data['messages_total'] = $messages_total;
    $template->data['external_messengers'] = $janus_config->getArray('messenger.external');
    $template->data['current_page'] = $page;
    $template->data['last_page'] = ceil((double) $messages_total / $pm->getPaginationCount());
}
/* END TAB MESSAGE PROVISIONING ***************************************************************************************/
$template->data['logouturl'] = $as->getLogoutURL();
/* START TAB ARPADMIN PROVISIONING ************************************************************************************/
if ($selectedtab == SELECTED_TAB_ARPADMIN) {
    $template->data['arp_attributes'] = $arp_attributes;
}
/* END TAB ARPADMIN PROVISIONING **************************************************************************************/
/* START TAB ADMIN PROVISIONING ***************************************************************************************/
if ($selectedtab == SELECTED_TAB_ADMIN) {
    $template->data['users'] = $userController->getUsers();
}
/* END TAB ADMIN PROVISIONING *****************************************************************************************/
/* START TAB ENTITIES PROVISIONING ************************************************************************************/
if ($selectedtab == SELECTED_TAB_ENTITIES) {
    if (isset($old_entityid)) {
        $template->data['old_entityid'] = $old_entityid;
    }
开发者ID:janus-ssp,项目名称:janus,代码行数:31,代码来源:dashboard.php

示例4: array

<?php

$config = SimpleSAML_Configuration::getInstance();
$session = SimpleSAML_Session::getInstance();
$uregconf = SimpleSAML_Configuration::getConfig('module_selfregister.php');
/* Get a reference to our authentication source. */
$asId = $uregconf->getString('auth');
$links = array();
$links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/newUser.php'), 'text' => '{selfregister:selfregister:link_newuser}');
$links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/lostPassword.php'), 'text' => '{selfregister:selfregister:link_lostpw}');
if ($session->isAuthenticated()) {
    $uregconf = SimpleSAML_Configuration::getConfig('module_selfregister.php');
    if ($session->getAuthority() == $asId) {
        $as = new SimpleSAML_Auth_Simple($asId);
        $links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/reviewUser.php'), 'text' => '{selfregister:selfregister:link_review}');
        $links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/changePassword.php'), 'text' => '{selfregister:selfregister:link_changepw}');
        $links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/delUser.php'), 'text' => '{selfregister:selfregister:link_deluser}');
        $links[] = array('href' => $as->getLogoutURL(), 'text' => '{status:logout}');
    } else {
        $links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/reviewUser.php'), 'text' => '{selfregister:selfregister:link_enter}');
    }
} else {
    $links[] = array('href' => SimpleSAML_Module::getModuleURL('selfregister/reviewUser.php'), 'text' => '{selfregister:selfregister:link_enter}');
}
$html = new SimpleSAML_XHTML_Template($config, 'selfregister:index.tpl.php', 'selfregister:selfregister');
$html->data['source'] = $asId;
$html->data['links'] = $links;
if (array_key_exists('status', $_GET) && $_GET['status'] == 'deleted') {
    $html->data['userMessage'] = 'message_userdel';
}
$html->show();
开发者ID:googlecode-mirror,项目名称:simplesamlphp-labs,代码行数:31,代码来源:index.php

示例5: saml_logout

function saml_logout()
{
    global $SAML_options;
    if (!file_exists($SAML_options['simplesamlphp_basedir'] . '/lib/_autoload.php')) {
        throw new RackTablesError('Configured for SAML authentication, but simplesaml is not found.', RackTablesError::MISCONFIGURED);
    }
    require_once $SAML_options['simplesamlphp_basedir'] . '/lib/_autoload.php';
    $as = new SimpleSAML_Auth_Simple($SAML_options['sp_profile']);
    header("Location: " . $as->getLogoutURL('/'));
    exit;
}
开发者ID:spartak-radchenko,项目名称:racktables,代码行数:11,代码来源:auth.php

示例6: getAttributesInitToken

 private function getAttributesInitToken()
 {
     require_once '/var/simplesamlphp/lib/_autoload.php';
     $auth = new \SimpleSAML_Auth_Simple('default-sp');
     $auth->requireAuth();
     \Factory::$properties['LOGOUTURL'] = $auth->getLogoutURL('https://' . gethostname());
     $attributes = $auth->getAttributes();
     if (!empty($attributes)) {
         // which idp did the user select?
         $idp = $auth->getAuthData('saml:sp:IdP');
         // EGI IdP
         if ($idp == 'https://www.egi.eu/idp/shibboleth') {
             // For EGI federated id:
             //$dnAttribute = $attributes['urn:oid:1.3.6.1.4.1.11433.2.2.1.9'][0];
             //if (!empty($dnAttribute)) {
             //    $this->principle = str_replace("emailAddress=", "Email=", $dnAttribute);
             //    $this->userDetails = array('AuthenticationRealm' => array('EGI_SSO_IDP'));
             //}
             $nameID = $auth->getAuthData('saml:sp:NameID');
             $this->principle = $nameID['Value'];
             $this->userDetails = array('AuthenticationRealm' => array('EGI_SSO_IDP'));
             // iterate the attributes and store in the userDetails
             // Each attribute name can be used as an index into $attributes to obtain the value.
             // Every attribute value is an array - a single-valued attribute is an array of a single element.
             foreach ($attributes as $key => $valArray) {
                 $this->userDetails[$key] = $valArray;
             }
         } else {
             if ($idp == 'https://unity.eudat-aai.fz-juelich.de:8443/saml-idp/metadata') {
                 // For EUDAT federated id:
                 //$dnAttribute = $attributes['urn:oid:2.5.4.49'][0];
                 //$dnAttribute = $attributes['unity:identity:persistent'][0];
                 //print_r($attributes);
                 $nameID = $auth->getAuthData('saml:sp:NameID');
                 $this->principle = $nameID['Value'];
                 $this->userDetails = array('AuthenticationRealm' => array('EUDAT_SSO_IDP'));
                 // iterate the attributes and store in the userDetails
                 // Each attribute name can be used as an index into $attributes to obtain the value.
                 // Every attribute value is an array - a single-valued attribute is an array of a single element.
                 foreach ($attributes as $key => $valArray) {
                     $this->userDetails[$key] = $valArray;
                 }
             }
         }
     }
 }
开发者ID:Tom-Byrne,项目名称:gocdb,代码行数:46,代码来源:SimpleSamlPhpAuthToken.php


注:本文中的SimpleSAML_Auth_Simple::getLogoutURL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。