Files
Facilitor/APPL/AUT/authenticate.asp
Jos Groot Lipman 1e31a333db PGHE#79425 Inloggen als in PCHD logt mij in PGHE in als die persoon
svn path=/Website/trunk/; revision=61329
2023-07-31 10:03:36 +00:00

49 lines
1.4 KiB
Plaintext

<%@language = "javascript" %>
<% /*
$Revision$
$Id$
File: authenticate.asp
Description: Voor als je (een) FACILITOR als Identity Provider wilt
gebruiken
Parameters: redirect_uri
return_to
aud
state
Context:
Note: Enigszins conform oAuth/ OpenID Connect maar daar (nog) niet
noodzakelijkerwijs compatible mee.
*/
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="./login.inc" -->
<%
var redirect_uri = getQParam("redirect_uri", rooturl + "/"); // TODO: verify?
var return_to = getQParam("return_to", "");
var aud = getQParam("aud", "");
var state = getQParam("state", "");
var u_key = user_key;
if (Session("org_user_key") > 0)
{
u_key = Session("org_user_key"); // Altijd als de originele
}
if (u_key > 0)
{
var jwt = jwt_create(u_key, aud);
var url = redirect_uri + (redirect_uri.indexOf("?")>=0?"&":"?") + "jwt={0}";
if (return_to)
url = url + "&return_to=" + Server.URLencode(return_to);
if (state)
url = url + "&state=" + Server.URLencode(state);
Response.Redirect(url.format(jwt));
}
// Hier kom je nooit volgens mij
Response.Write("Wie ben jij in {0}?".format(customerId));
%>
<% ASPPAGE_END(); %>