Hi Hossam,
Lets take the example of invoking a TOTP policy.
https://192.168.42.102/mga/sps/authsvc?PolicyId=urn:ibm:security:authentication:asf:totp&Target=https://192.168.42.102If I do not have a user session and it results in a server error(Template Page-> C/authsvc/server_error.html) , If I were to change the response "Content-Type" header to application/json.
I add the following piece of code to C/authsvc/server_error.html
<%templateContext.response.setHeader("Content-Type","application/json");%>
The resulting response headers when the TOTP policy invoked.
HTTP/1.1 200 OK
content-language: en-US
content-type: application/jsondate: Tue, 26 Nov 2019 02:35:44 GMT
p3p: CP="NON CUR OTPi OUR NOR UNI"
server: IBM Security Access Manager
transfer-encoding: chunked
x-frame-options: SAMEORIGIN
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubDomains
I hope this helps.
------------------------------
Sumana Narasipur
------------------------------