Set Authorization header with credentials. #13

Merged
merged 1 commit into from May 10, 2012

Conversation

Projects
None yet
3 participants
@caike
Contributor

caike commented May 10, 2012

This allows for properly authenticating with APIs
that don't require encoded Basic Auth credentials,
like github.

Set Authorization header with credentials.
This allows for properly authenticating with APIs
that don't require encoded Basic Auth credentials,
like github.

mattetti added a commit that referenced this pull request May 10, 2012

Merge pull request #13 from caike/http_basic_auth
Set Authorization header with credentials.

@mattetti mattetti merged commit 4cb6213 into rubymotion:master May 10, 2012

@mattetti

This comment has been minimized.

Show comment Hide comment
@mattetti

mattetti May 10, 2012

Contributor

Thanks!

Contributor

mattetti commented May 10, 2012

Thanks!

noahhl added a commit to noahhl/BubbleWrap that referenced this pull request May 10, 2012

Prevent a specifically set Authorization header from being trampled b…
…y assumed credentials (introduced in pull request #13)
@dcampano

This comment has been minimized.

Show comment Hide comment
@dcampano

dcampano May 10, 2012

Contributor

I'm having a problem authenticating after this line was added:

new_request.setValue(@credentials.inspect, forHTTPHeaderField:'Authorization')

I was able to authenticate previously before updating this repo. If I comment out that line then I receive "auth challenged, answered with credentials:" and the authentication works fine

Contributor

dcampano commented May 10, 2012

I'm having a problem authenticating after this line was added:

new_request.setValue(@credentials.inspect, forHTTPHeaderField:'Authorization')

I was able to authenticate previously before updating this repo. If I comment out that line then I receive "auth challenged, answered with credentials:" and the authentication works fine

@mattetti

This comment has been minimized.

Show comment Hide comment
@mattetti

mattetti May 10, 2012

Contributor

Ok I'm going to disable the credentials passing in the redirect case and maybe someone can come up with some tests to valid the right away to do that. (Also, we really need to get the spec patch applied, so help me by creating a support ticket)

Contributor

mattetti commented May 10, 2012

Ok I'm going to disable the credentials passing in the redirect case and maybe someone can come up with some tests to valid the right away to do that. (Also, we really need to get the spec patch applied, so help me by creating a support ticket)

@mattetti

This comment has been minimized.

Show comment Hide comment
@mattetti

mattetti May 10, 2012

Contributor

@caike in the meantime, you can set the headers with the authorization info and it should work since they are copied over in the redirect.

Contributor

mattetti commented May 10, 2012

@caike in the meantime, you can set the headers with the authorization info and it should work since they are copied over in the redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment