I have a Java native app I am trying to implement Oauth for. I have gone thru this article by Pat Patterson:
I am a little lost on a couple of points. I can work out how to make a call from Java to the initial URL (https://login.salesforce.com/services/oauth2/authorize?response_type=token&client_id=xxx&redirect_uri=myapp:oauth&display=full). From what I can see, this returns a redirect. What exactly does the Java app have to do to bring up the browser window with the authorization request?
Maybe I'm not explaining what I am looking for. Let me clarify. I want to get a refresh token for my desktop app, and store the refresh token. The article says:
In this flow, the client application directs (1) the user to a URL at the authorization server of the form: https://login.salesforce.com/services/oauth2/authorize?response_type=token& client_id=&redirect_uri=&display=touch&state=
On a browser, this redirects to a URL which takes the user to the SFDC login page, and then to a page asking the user to approve access to the application. So my first question is, in the Java app, how do I open the URL so that it redirects to the browser, while maintaining control of the browser? I tried JPaneEditor, it did not seem to work. The article then continues:
So how exactly does my desktop app read the URL fragment at this point?
I hope this clarifies what I am looking for.