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

options.auth passes straight through to request library. #298

Merged
merged 1 commit into from
Jan 6, 2016
Merged

Conversation

Freyert
Copy link
Contributor

@Freyert Freyert commented Jan 5, 2016

The reason to do this is so that we don't re-do the functionality that request has already made for us. This way users can use OAuth Tokens or any other authentication strategy supported by request, but still remains backwards compatible with the cradle API.

I'm in the midst of providing a request pass through option to open cradle up to the full functionality. Configuration in general could use a re-work, but would definitely lead to breaking changes in most areas. In my opinion, 90% of cradle's configuration variables configure request and therefore cradle should pick off the values it needs and just pass the rest to request.

@panuhorsmalahti
Copy link
Contributor

Do you consider this to be a breaking change? If not, I can merge this for the next release (which I should do asap). After that we can start working on 1.0.0 with reasonable breaking changes.

@Freyert
Copy link
Contributor Author

Freyert commented Jan 6, 2016

It's not a breaking change. cradle was already taking all the various interfaces for adding authentication to a connection, and transforming it into an object like the one below:

{
  user: "xxxx"
  pass: "yyyy"
}

Which is exactly what request expects. username and password are also valid.

panuhorsmalahti added a commit that referenced this pull request Jan 6, 2016
options.auth passes straight through to request library.
@panuhorsmalahti panuhorsmalahti merged commit 599eaa2 into flatiron:master Jan 6, 2016
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

Successfully merging this pull request may close these issues.

2 participants