Use 'Bearer' in Authorization HTTP Header #696

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@humblehacker

Changes 'OAuth2' to 'Bearer'.

Fixes #643

Owner

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 commented Oct 26, 2012

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

Owner

@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 commented Oct 26, 2012

@blakewatters Thanks for laying out some options 😃

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?

@eroth eroth referenced this pull request in nst/STTwitter May 17, 2013
Closed

Integration with RestKit #4

0xdatou commented Oct 23, 2016 edited

@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