55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
<%@language = "javascript" %>
|
|
<% /*
|
|
$Revision$
|
|
$Id$
|
|
*/ %>
|
|
|
|
<%
|
|
var EXPIRED_PASSWORD_OK = true;
|
|
var JSON_Result = true;
|
|
%>
|
|
|
|
<!-- #include file="../Shared/common.inc" -->
|
|
<!-- #include file="../Shared/json2.js" -->
|
|
<!-- #include file="./login.inc" -->
|
|
|
|
<%
|
|
protectRequest.validateToken();
|
|
var result = { success: true };
|
|
|
|
// FACFAC tracken we altijd
|
|
if (user.has("WEB_FACFAC"))
|
|
shared.trackaction("PRSLOG", user_key, L("lcl_logged_off").format(Session("ASPFIXATION").slice(-6)));
|
|
|
|
if (Session("org_user_key") > 0)
|
|
{
|
|
result.return_url = rooturl + "/";
|
|
var was_key = user_key;
|
|
var other_key = parseInt(Session("org_user_key"), 10);
|
|
var other_naam = user.naam();
|
|
doLogin(other_key);
|
|
var since = new Date(Session("org_user_key_ts"));
|
|
result.message = L("lcl_impersonate_return").format(user.naam());
|
|
shared.trackaction("PRSLOG", was_key, L("lcl_impersonated_end").format(toDateTimeString(since)));
|
|
Session.Contents.Remove("org_user_key");
|
|
Session.Contents.Remove("org_user_key_ts");
|
|
}
|
|
else
|
|
{
|
|
result.return_url = S("logoff_return_url");
|
|
if (Session("idp_key") > 0)
|
|
{
|
|
var sql = "SELECT aut_idp_remote_logouturl"
|
|
+ " FROM aut_idp"
|
|
+ " WHERE aut_idp_key = " + Session("idp_key");
|
|
var oRs = Oracle.Execute(sql);
|
|
if (oRs("aut_idp_remote_logouturl").Value)
|
|
result.return_url = oRs("aut_idp_remote_logouturl").Value;
|
|
oRs.Close();
|
|
}
|
|
|
|
doLogoff();
|
|
}
|
|
Response.Write(JSON.stringify(result));
|
|
Response.End;
|
|
%> |