Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the url of the Bullhorn::Rest::Authentication login method configurable #7

Open
fmquaglia opened this issue Apr 14, 2015 · 5 comments

Comments

@fmquaglia
Copy link

Recently while trying to auth at https://auth.bullhornstaffing.com/oauth/authorize?action=Login&client_id=XXX&response_type=code&username=XXX (replacing XXX with my own values) I got the following server error:

error=server_error
error_description=java.net.UnknownHostException: sl19redis.vip.bos.bullhorn.com

At Bullhorn's forums I found this solution.

So it seems that might be necessary to make the url variable of the Bullhorn::Rest::Authentication login method configurable (via constructor's attribute maybe?).

Otherwise hitting the one that is hardcoded throws an error (if the user must use an alternative instance instead of the default one -- e.g. auth9...... --):

ArgumentError: bad argument (expected URI object or URI string)
    from .../.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/uri/common.rb:715:in `URI'
    from .../.rvm/gems/ruby-2.2.0@bullhorn_sinatra/bundler/gems/bullhorn-rest-6ae47f94e1e4/lib/bullhorn/rest/authentication.rb:93:in `rest_url='
    from .../.rvm/gems/ruby-2.2.0@bullhorn_sinatra/bundler/gems/bullhorn-rest-6ae47f94e1e4/lib/bullhorn/rest/authentication.rb:71:in `login'
        # .....
    from -e:1:in `load'
    from -e:1:in `<main>'

Does that seem feasible?

@ghempton
Copy link
Contributor

Sounds feasible. We don't currently consume this gem right now, but if you want to add that functionality I will merge.

@fmquaglia
Copy link
Author

Right on @ghempton .
You'll have it shortly.
Thanks, man.

@draknor
Copy link
Contributor

draknor commented May 5, 2015

I added this to my clone - will send PR momentarily.

@fmquaglia
Copy link
Author

I've been using @draknor 's branch, and so far it works really well.
Thanks matey.

@draknor
Copy link
Contributor

draknor commented May 13, 2015

No problem - glad to help! Will try to get my other enhancements better segregated & organized so I can send PRs for those, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants