For a salesforce touch mobile app. I need to modify the SDK to customize the oauth process. Because I need to call web services from two sites. One is salesforce, another is client's web service. So, I supposed to oauth twice. But I do not want to users to log in twice. My thought is using the username-password flow. On the customized log in page, I asked the user to type in the username/password for external oauth. Behind the scene, I am going to hardcode the client Id/client secret for salesforce oauth.
I think I need to modify the SDK's OAuth2.java class. But because it is the first time for me to do this, I am not sure how to do this. And apparently not so many people will do two oauths.. so I did not find solutions. Could anyone give some hints how to do this?