Finalized version 0.2.0 -- accepts return_sso_url and can be used from multiple instances now (using same shared key).
This commit is contained in:
@@ -120,6 +120,9 @@ class SsoController extends ActionController
|
||||
} else {
|
||||
// Valid $sso string available, convert it.
|
||||
parse_str(base64_decode($sso), $receivedPayload);
|
||||
// Identify server entry in configuration.
|
||||
$returnSsoUrl = $receivedPayload['return_sso_url'];
|
||||
|
||||
// GeneralUtility::devLog('authenticateAction valid sso request', $extKey, 0, array('payload' => $receivedPayload));
|
||||
$user = null;
|
||||
if (isset($GLOBALS['TSFE']) === true
|
||||
@@ -145,7 +148,8 @@ class SsoController extends ActionController
|
||||
$payload = base64_encode(http_build_query($parameters));
|
||||
$signature = hash_hmac('sha256', $payload, $sharedKey);
|
||||
$query = http_build_query(array('sso' => $payload, 'sig' => $signature));
|
||||
$redirectUrl = $redirectUrlRoot.'/session/sso_login?'.$query;
|
||||
$redirectUrl = $returnSsoUrl.'?'.$query;
|
||||
|
||||
// GeneralUtility::devLog('authenticateAction successful, redirecting', $extKey, 0, array('redirectUrl' => $redirectUrl, 'status' => $redirectStatus, 'payload' => $payload, 'parameter' => $parameters));
|
||||
$this->redirectToUri($redirectUrl, 0, $redirectStatus);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user