Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

uninitialized constant LeanTesting::OAuth2Handler::Curl #4

Open
lucygeneric opened this issue May 19, 2016 · 0 comments
Open

uninitialized constant LeanTesting::OAuth2Handler::Curl #4

lucygeneric opened this issue May 19, 2016 · 0 comments

Comments

@lucygeneric
Copy link

I may be going about this completely wrong ~ Whenever I try to consume OAuth2 I get an uninit. constant error as in title for leantesting.auth.generateAuthLink

The docs are not very clear on how to generate the token. This is my first time with OAuth - I may be missing some fundamental basics ;)

require 'leantesting'

  leantesting = LeanTesting::Client.new

  auth = leantesting.auth.generateAuthLink(LEAN_TESTING_CONFIG[:client_id], LEAN_TESTING_CONFIG[:callback_url])

  token = leantesting.auth.exchangeAuthCode(
    LEAN_TESTING_CONFIG[:client_id],
    LEAN_TESTING_CONFIG[:client_secret],
    'authorization_code',
    auth,
    LEAN_TESTING_CONFIG[:callback_url]
  )

  leantesting.attachToken(token)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant