JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

"Updates, discussions, and documentation of the BungieNetPlatform API."

Request Join
originally posted in:BungieNetPlatform
6/23/2015 3:09:26 PM
2

Authentication with Java

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?

Posting in language:

 

Cancel Edit Create Fireteam Post Play nice. Take a minute to review our Code of Conduct before submitting your post.

  • 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 ;-)

    Posting in language:

     

    Cancel Edit Create Fireteam Post Play nice. Take a minute to review our Code of Conduct before submitting your post.

    2 Replies
    • Nvm I managed to fix it. I'll post the code once I clean up the flow and polish it up a little.

      Posting in language:

       

      Cancel Edit Create Fireteam Post Play nice. Take a minute to review our Code of Conduct before submitting your post.

    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon