Hi Krish,
There are a few parts to this question. Let me split them out.
First, the question of triggering different (external) authentication for different junctions.
How are you currently triggering EAI? If it is using local-response-redirect then you can make this configuration junction-specific by adding the junction name to the [local-response-redirect] stanza. So it would become [local-response-redirect:/junction1]. In this way, you can have access to one junction redirect to you EAI and access to a different junction redirect to the custom login page in the other application.
Another way you might be redirecting to an EAI is via modification of the login.html page (to do a redirect). If this is the case, you could add custom JavaScript in this page to read the current URL (in %URL% macro) and redirect to different login page from there.
Second there is the question of posting direct to pkmslogin.form. This is possible but have a look at what the "real" login.html file includes in its POST so that you can make sure your custom login page sends the same parameters.
Finally you asked about the REST API for password authentication. You could use this from your application if you want it to perform authentication as a Single Page Application. The body of the request to send to the password endpoint is:
{
"operation": "verify",
"username": "{{user_id}}",
"password": "{{user_pw}}"
}
The API will not return a redirect on authentication success - it will return a 204 (no content) message. I *think* that the PD-S-SESSION-ID cookie will be returned with this message so that subsequent browser calls will be authenticated.
Jon.
------------------------------
Jon Harry
Consulting IT Security Specialist
IBM
------------------------------