views:

308

answers:

1

I have a single sign-on solution, meaning that the user will login to one site and be redirected to another. When I redirect the user I want to pass along a key that can be used to verify the user's authentication status.

Most of the examples of single sign-on I read show the login site passing the encrypted key has a query string value. I don't think this is a very good solution because it's not very REST-ful or whatever you want to call it. Instead I'd like to pass the encrypted key in the POST data. So when the user logins in, they are POSTing to another url.

Unfortunately I don't know (yet) how to do this with the Response.Redirect or Server.Transfer. I think Response.Redirect passes the same POST data along when it redirects.

Does someone know how to redirect a website user in asp.net, changing the POST data while redirecting?

(bonus question: can you change a GET to a POST while redirecting?)

+3  A: 
Rex M
Are you saying you can change variables with Server.Transfer?
Mark Rogers
POST data that is. I'm not concerned with preserving the data, as I am with changing it.
Mark Rogers
@m4bwav why would you want to change the values? They are only being moved in memory from one request to another.
Rex M
I may have a concept wrong here. But when the user hits login, I want to transfer them to another page with a key in the POST data. Is that possible, what am I missing here?
Mark Rogers
@m4bwav see my edit for more clarification.
Rex M
ok thanks for your excellent explanation.
Mark Rogers