JavaScript is required to use Bungie.net

Group Avatar

BungieNetPlatform

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

Request Join
originally posted in:BungieNetPlatform
Edited by COUGAR CHAS3R: 10/29/2015 7:16:40 PM
3

Ruby login example?

I was wondering if anyone had a working example of authenticating with Ruby. I'm working on an app with a few people and we can't get past authentication. I am new to Ruby and can't quite get the conversion from PHP to Ruby working. Thanks

Posting in language:

 

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

View Entire Topic
  • I have a personal ruby mapping that I use for a couple personal projects. I'll try to give you enough info. Note: This is very rough code. I got it to work, and haven't looked at it since. Note that I'm not a ruby guru, I started this in Ruby mostly as a learning project. Note that I'm using [url=https://github.com/nahi/httpclient]httpclient[/url] Each login type has a class that handles authentication: http://pastebin.com/aD8NT3hR This process should populate your client's cookie jar with the appropriate authentication cookies. An instance of this class is passed to my main API wrapper class' authenticate method: http://pastebin.com/fUsTgs87 Note that I'm pulling the CSRF value from the bungled cookie. When I make an authenticated request, I pass that value as an extra header called X-CSRF: http://pastebin.com/h7J6fhQa Some selected constants from the Endpoints module: http://pastebin.com/n8UhbYtk hth

    Posting in language:

     

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

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