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

Use 'Bearer' in Authorization HTTP Header #696

Closed
wants to merge 1 commit into from

Conversation

humblehacker
Copy link

Changes 'OAuth2' to 'Bearer'.

Fixes #643

@blakewatters
Copy link
Member

I have removed OAuth from the project core as of the reboot-networking-layer branch. The recommendation going forward will be to pick an OAuth library of your choosing capable of signing NSURLRequest's and provide those to RestKit.

@amiel
Copy link

amiel commented Oct 26, 2012

@blakewatters Is there an example somewhere of providing a signed NSURLRequest to RestKit?

@blakewatters
Copy link
Member

@amiel You have two choices for integrating an OAuth provider:

  1. Subclass RKObjectManager and override the requestWithObject:method:path:parameters: method to sign requests as they are built by the manager.
  2. Subclass RKHTTPRequestOperation and configure RKObjectManager to use your custom subclass via the setHTTPOperationClass:. An instance of the HTTP operation class is created for every request sent through the manager and it is initialized with the request as built by the manager. Here would be a good place to apply signing using GCOAuth or whatever to the request.

I do not have an example of this, but I hope the above is enough to get you going...

@amiel
Copy link

amiel commented Oct 26, 2012

@blakewatters Thanks for laying out some options 😃

@amiel
Copy link

amiel commented Nov 3, 2012

@blakewatters: correct me if I'm wrong, but it looks like RKHTTPRequestOperation is not part of 0.10.3 (which I think is the latest stable release right?). So do I need to use the development branch to do this?

I'm excited about the changes you are making in development, but it's a bit harder for me to use because the documentation and examples aren't quite there yet.

Would it be possible to sign requests in this way using RestKit 0.10.3 or should I bite the bullet and try to figure out the development branch?

@0xxxD
Copy link

0xxxD commented Oct 23, 2016

@blakewatters Your suggestion is of great help to me!! THX~

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.

4 participants