originally posted in:BungieNetPlatform
Has anyone tried to put a login flow togheter for java? I've seen there are code snippets for php, python and bash, no java. I translated the flow into java and it's almost working. I get a bad request (400) error on the last step (https://auth.api.sonyentertainmentnetwork.com/2.0/oauth/authorize?response_type=code&client_id=78420c74-1fdf-4575-b43f-eb94c7d770bf&redirect_uri=https%3a%2f%2fwww.bungie.net%2fen%2fUser%2fSignIn%2fPsnid&scope=psn:s2s&request_locale=en) and with that error it's not redirecting and the whole thing goes down the drain. I tried quite a lot of settings to have the last step work but no luck yet. Any of you managed to make it work?
Here's the code to do sign in in java. [url=http://pastebin.com/mb8Rcbha]Check it out[/url] [u]Usage:[/u] [i]BungieLoginSingleton bLogin = BungieLoginSingleton.getInstance(); boolean loggedIn = bLogin.checkLogin("uname", "pword", 2); //1 = XBOX, 2= PSN[/i] I didn't have time to watch into it and improve the code but it's a start for those who need help with login in Java. Hope this helps some of you ;-)
Nvm I managed to fix it. I'll post the code once I clean up the flow and polish it up a little.