FSN#45727 App kunnen herkennen in asp en dan geen 'naar classic' tonen
svn path=/Website/branches/v2017.2/; revision=35661
This commit is contained in:
@@ -94,6 +94,11 @@ var JSON_Result = true;
|
||||
"issued_at": Math.floor(cp_data.accessdate.getTime() / 1000)
|
||||
// "refresh_url": HTTP.urlzelf() + "/appl/aut/getapptoken.asp?client_id={0}&auth={1}".format(sp, spp_data.refreshtoken)
|
||||
}
|
||||
// een accesstoken wordt eventueel weer opgevangen in loginTry via http header X-FACILITOR-ACCESS-TOKEN
|
||||
|
||||
Session("aut_client_key") = cp_data.autclient.id;
|
||||
Session("aut_client_name") = cp_data.autclient.name;
|
||||
|
||||
Response.Write(JSON.stringify(result));
|
||||
Response.End;
|
||||
%>
|
||||
|
||||
@@ -118,7 +118,7 @@ if (user_key < 0) // Probeer de user_key uit een cookie te halen
|
||||
|
||||
if (user_key < 0)
|
||||
{
|
||||
var auth = String(Request.ServerVariables("HTTP_X_FACILITOR_ACCESS_TOKEN"));
|
||||
var auth = String(Request.ServerVariables("HTTP_X_FACILITOR_ACCESS_TOKEN")); // Deze is aangemaakt in /aut/getapptoken.asp
|
||||
if (auth.match(/^1\$/)) // Mode 1$xxxxxxx
|
||||
{
|
||||
__Log("Found HTTP_X_FACILITOR_ACCESS_TOKEN");
|
||||
@@ -129,6 +129,8 @@ if (user_key < 0)
|
||||
{
|
||||
doLogin(cp_data.person.id);
|
||||
model_client_perslid.REST_PUT({}, { login: new Date() }, cp_data.id);
|
||||
Session("aut_client_key") = cp_data.autclient.id;
|
||||
Session("aut_client_name") = cp_data.autclient.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ function FOOTER(params)
|
||||
if (params.back) {%><a data-role="button" data-icon="back" data-iconpos="<%=jQButtonIconpos%>" onclick="window.history.back(1)"><%=L("lcl_back")%></a><%}%>
|
||||
<div class="f1">
|
||||
<%
|
||||
if (params.mswitch)
|
||||
if (params.mswitch && !device.isapp())
|
||||
var txt = "<span class='mobile2touch'>"
|
||||
+ "<a href='" + rooturl + "/default.asp?touch=1' target=_top>"+L("lcl_mobile_classicmode")+"</a>"
|
||||
+ "</span>";
|
||||
|
||||
@@ -1615,6 +1615,10 @@ device =
|
||||
else // reset
|
||||
this._devicebits = this._devicebits & (~bits);
|
||||
Session("devicebits") = this._devicebits;
|
||||
},
|
||||
isapp: function ()
|
||||
{
|
||||
return Session("aut_client_key") > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user