Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
5 subscribers
Views
1589 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
I'm trying to call a servlet plugin(hosted in SSO) using a java client , htt
senthilkumark
over 9 years ago
I'm trying to call a servlet plugin(hosted in SSO) using a java client , http status code is 200 but response content shows the html with SSO page to authenticate .
How do I add any input security credentials call a custom servlet plugin from a process model ?
OriginalPostID-185960
OriginalPostID-185960
Discussion posts and replies are publicly visible
0
rawich
over 9 years ago
If you're using Apache HttpClient or similar Java client, you can first retrieve that login page (which you already done), and then do a POST with your login credentials, as if you're submitting the login form using browser. After that, your Java HTTP client should receive cookies representing authenticated session with the SSO system. Then reuse that HTTP client to invoke the target Servlet.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
senthilkumark
over 9 years ago
I don't want manual intervention of posting the form with user credentials . Is there any way in Apache Http Client (version 4.3 am using) to call a custom servlet with user credentials to authenticate the session automatically by setting the user/pwd
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rawich
over 9 years ago
No manual intervention, I meant you can gather information by looking at the HTML/JavaScript code in the SSO login page, and see what needs to be included in the POST request (HTML form) to the target URL when a user is logging in. You can use HTTP debugging tools available in Chrome or Firefox for this.
Then you can use HttpClient in your code to send that same POST request (with credentials you received from process) to the same target URL, so that the HttpClient will receive the cookies. After that, when you use the same HttpClient to invoke the target Servlet, it will get through within getting the login screen again.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel