java - How to automatically login from a webapp to another webapp -


i have web-app (let's call app1),in can't see source code, , it.i need basic authentication, "user, pass".

then creating web-app (app2) (which java/jsf/icefaces), have login using user pass (the user , pass app1 same user , pass app2).

sometimes have open 1 app1 window (to fill in forms, not want replicate in app2). have valid url window/form, but, here problem, when call url, app1 first asks user/pass, , not want that. single sign on. basic authentication (and have user pass).

i tried open new jsp in app2, , there sendredirect app1 trying basic authentication, cant, mean, not work.

app1 has rest api, , can use app2 basic authentication (so works).

can me?

thaks!!

you can use sso (single sign on) concept this. if want sso straight, yes can follow sso modules, provided people. ofcourse can create own sso method, implement these steps:

1-> use rest/soap api login app1. in response, give parameter (an encrypted string or something). store in cookie.(in back, save parameter against timeout , user information eg, in hashmap)

2->while login happens second app, send parameter request. if accept parameter in backend, try validate against timeout , may user info.proceed authentication on success.

you can set parameter in domain level cookie.,so process happens in backend.

can try , let me know?

thanks


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -