我有一个登录系统,我想在我的网络服务器上向我的子网站介绍,但用户登录后不会被重定向回正确的位置。
现在SSO将用户发送到 -
https://site.com/home/index.php?email=first.last@thomsonreuters.com&firstname=First&lastname=Last&marketgroup=43003&uid=4334525&time=2014:07:24:19:14:57&digest=1758b84916f36245cad17fd325f8d3&returnurl=https://site.com/sandbox/subsite
因此,即使为子目录设置了returnurl,用户仍会被重定向回site.com。不知道下一步是什么。
下面的代码段。如果您需要更多,请告诉我。
define('SSO_REDIRECT', 'https://sso.com/login/sso/SSOService?app=' . SSO_APP_ID . '&returnurl=' . urlencode('https://site.com/sandbox/subsite'));
// Start authentication and authorization
if (!isset($_SESSION['USER_ID']) && !isset($_POST['digest'])) {
// We've got no session and we've not returned from SSO, so let's redirect to SSO
header('Location: ' . SSO_REDIRECT);
die();
}