[prev in list] [next in list] [prev in thread] [next in thread]
List: forgerock-openam
Subject: [OpenAM] Scripted Auth Module need 2 step RESTful API call
From: Long Man <longman () barramandi ! com>
Date: 2017-11-16 8:37:46
Message-ID: CA+bvQzY+csqnVrq1t62-eya8OV_wQah5iz6fVXfbdZOYm+NRtg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
(Version 13.0.0)
Even though the Scripted Module already have "Client-side Script Enabled"
unchecked, it still requires the REST API call to do a 2 step call.
The first step will return below JSON message and this message need to be
POSTed back in the 2nd call to complete the authentication.
Is this a defect?
Since no client side script is needed, why it requires a second step
callback?
{
"authId":
"eyAidHlwIjogIkpXVCIsICJhbGciOiAiSFMyNTYiIH0.eyAiYXV0aEluZGV4VmFsdWUiOiAidGVzdGNoYWluI \
iwgIm90ayI6ICIxN3Z1cDNzcmhvNjB0ZWpkYjVvNmp1ZGZoYSIsICJhdXRoSW5kZXhUeXBlIjogInNlcnZpY2U \
iLCAicmVhbG0iOiAiZGM9b3BlbmFtLGRjPWZvcmdlcm9jayxkYz1vcmciLCAic2Vzc2lvbklkIjogIkFRSUM1d \
00yTFk0U2Zjd1I3WFluREpHUEpkMFZueXJ3U3N3bG5VWFRReGlPNmF3LipBQUpUU1FBQ01ESUFBbE5MQUJRdE1 \
qWTJNRE01T1RVd01ERXlOVFl3TlRjMU5RQUNVekVBQUEuLioiIH0.Ak7lrE0Gv5nDthvXt21DQOZ1pp1PurbVkyrgl1Qmero",
"template": "",
"stage": "Scripted2",
"header": "Sign in to OpenAM",
"callbacks": [
{
"type": "HiddenValueCallback",
"output": [ {
"name": "value",
"value": ""
}],
"input": [ {
"name": "IDToken1",
"value": "clientScriptOutputData"
}]
},
{
"type": "TextOutputCallback",
"output": [
{
"name": "message",
"value": "if (window.require) {\n var messenger =
require(\"org/forgerock/commons/ui/common/components/Messages\"),\n
spinner =
require(\"org/forgerock/commons/ui/common/main/SpinnerManager\"),\n
message = {message:\"Collecting Data...\", type:\"info\"};\n
spinner.showSpinner();\n}(function(output) {\n var autoSubmitDelay =
0,\n submitted = false;\n function submit() {\n if
(submitted) {\n return;\n } if (!(window.jQuery))
{\n document.forms[0].submit();\n } else {\n
$('input[type=submit]').trigger('click');\n }\n submitted =
true;\n }\n \n setTimeout(submit, autoSubmitDelay);\n})
(document.forms[0].elements['clientScriptOutputData']);\n"
},
{
"name": "messageType",
"value": "4"
}
]
}
]
}
[Attachment #5 (text/html)]
<div dir="ltr"><div>(Version 13.0.0)</div>Even though the Scripted Module already \
have "<span style="color:rgb(42,47,50);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:700;text-align:right">Client-side \
Script Enabled</span>" unchecked, it still requires the REST API call to do a 2 \
step call.<div>The first step will return below JSON message and this message need to \
be POSTed back in the 2nd call to complete the \
authentication.</div><div><br></div><div>Is this a defect?</div><div>Since no client \
side script is needed, why it requires a second step \
callback?<br><div><br></div><div><br></div><div><div>{</div><div> \
"authId": "eyAidHlwIjogIkpXVCIsICJhbGciOiAiSFMyNTYiIH0.eyAiYXV0aEluZGV4 \
VmFsdWUiOiAidGVzdGNoYWluIiwgIm90ayI6ICIxN3Z1cDNzcmhvNjB0ZWpkYjVvNmp1ZGZoYSIsICJhdXRoSW \
5kZXhUeXBlIjogInNlcnZpY2UiLCAicmVhbG0iOiAiZGM9b3BlbmFtLGRjPWZvcmdlcm9jayxkYz1vcmciLCAi \
c2Vzc2lvbklkIjogIkFRSUM1d00yTFk0U2Zjd1I3WFluREpHUEpkMFZueXJ3U3N3bG5VWFRReGlPNmF3LipBQU \
pUU1FBQ01ESUFBbE5MQUJRdE1qWTJNRE01T1RVd01ERXlOVFl3TlRjMU5RQUNVekVBQUEuLioiIH0.Ak7lrE0Gv5nDthvXt21DQOZ1pp1PurbVkyrgl1Qmero",</div><div> \
"template": "",</div><div> "stage": \
"Scripted2",</div><div> "header": "Sign in to \
OpenAM",</div><div> "callbacks": [</div><div> \
{</div><div> "type": \
"HiddenValueCallback",</div><div> "output": [ \
{</div><div> "name": "value",</div><div> \
"value": ""</div><div> }],</div><div> \
"input": [ {</div><div> "name": \
"IDToken1",</div><div> "value": \
"clientScriptOutputData"</div><div> }]</div><div> \
},</div><div> {</div><div> "type": \
"TextOutputCallback",</div><div> "output": \
[</div><div> {</div><div> \
"name": "message",</div><div> \
"value": "if (window.require) {\n var messenger = \
require(\"org/forgerock/commons/ui/common/components/Messages\"),\n \
spinner = require(\"org/forgerock/commons/ui/common/main/SpinnerManager\"),\n \
message = {message:\"Collecting Data...\", type:\"info\"};\n \
spinner.showSpinner();\n}(function(output) {\n var autoSubmitDelay = 0,\n \
submitted = false;\n function submit() {\n if (submitted) {\n \
return;\n } if (!(window.jQuery)) {\n \
document.forms[0].submit();\n } else {\n \
$('input[type=submit]').trigger('click');\n }\n \
submitted = true;\n }\n \n setTimeout(submit, autoSubmitDelay);\n}) \
(document.forms[0].elements['clientScriptOutputData']);\n"</div><div> \
},</div><div> {</div><div> \
"name": "messageType",</div><div> \
"value": "4"</div><div> }</div><div> \
]</div><div> }</div><div> ]</div><div>}</div></div></div></div>
_______________________________________________
Visit the OpenAM forum at https://forgerock.org/forum/fr-projects/openam/
OpenAM mailing list
OpenAM@forgerock.org
https://lists.forgerock.org/mailman/listinfo/openam
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic