本文整理匯總了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. */