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


PHP SimpleSAML_Utilities::getAuthority方法代码示例

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


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

示例1: elseif

    if (isset($_GET['RelayState'])) {
        $requestcache['RelayState'] = $_GET['RelayState'];
    }
} else {
    SimpleSAML_Utilities::fatalError($session->getTrackID(), 'SSOSERVICEPARAMS');
}
/* Check whether we should authenticate with an AuthSource. Any time the auth-option matches a
 * valid AuthSource, we assume that this is the case.
 */
if (SimpleSAML_Auth_Source::getById($idpmetadata['auth']) !== NULL) {
    /* Authenticate with an AuthSource. */
    $authSource = TRUE;
    $authority = $idpmetadata['auth'];
} else {
    $authSource = FALSE;
    $authority = SimpleSAML_Utilities::getAuthority($idpmetadata);
}
/**
 * As we have passed the code above, we have an associated request that is already processed.
 *
 * Now we check whether we have a authenticated session. If we do not have an authenticated session,
 * we look up in the metadata of the IdP, to see what authenticaiton module to use, then we redirect
 * the user to the authentication module, to authenticate. Later the user is redirected back to this
 * endpoint - then the session is authenticated and set, and the user is redirected back with a RequestID
 * parameter so we can retrieve the cached information from the request.
 */
if (!isset($session) || !$session->isValid($authority)) {
    /* We don't have a valid session. */
    $needAuth = TRUE;
} elseif (array_key_exists('NeedAuthentication', $requestcache) && $requestcache['NeedAuthentication']) {
    /* We have a valid session, but ForceAuthn is on. */
开发者ID:hukumonline,项目名称:yii,代码行数:31,代码来源:SSOService.php


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