asp.net - How to redirect a client to a website after having authenticated it? -
i have implement simple single sign on (sso) solution between 2 existing internet applications hosted 2 different companies.
what should do:
- the user log application username , password.
- the user clicks on button in application launch application b.
- this button in fact link “facade” (an asp.net page) installed somewhere between application , application b.
- the facade retrieve token (included in url caller) , call web service of application token user's email. email included in response.
- the facade retrieved user/password of user local database , post them login page of application b.
- the facade redirect caller application b.
the problem is, don’t know how implement last step. response post (step 5) welcome page , cookie. i’ve tried copy response (a httpwebresponse
) response
of facade, while user can see welcom page content, there no redirection...
httpwebresponse applicationbresponse = postapplicationb(); var reader = new treamreader(applicationbresponse.getresponsestream()); string temp = reader.readtoend(); reader.close(); response.write(temp);
any idea how should implement redirection?
the way scheme work if rid of facade. instead, application should retrieve user's name , password , render page in hidden fields, contained in form. page should conclude snippet of javascript submit form application b. application b reply directly browser welcome page along session cookies.
if use facade, cookies won't propagate , end user browser not able access site. if modify facade pass along cookies, in wrong domain.
also, must comment, poor design security perspective.
Comments
Post a Comment