I am using RestKit with an own OAuth2 Provider. I try to authenticate via Resource Owner Password Credentials.
Could anyone provide some example code and best practices for requesting protected resources via RestKit in general and authenticating via credentials to get an access token in specific?
Probably ResKit itself is not the best choice?
You should check out this link: https://github.com/RestKit/RestKit/wiki/OAuth-Support-on-RestKit
You can try something like this (I do it in my app delegate):
Note: I haven’t tested it because I use AuthenticationTypeHTTPBasic instead
Hope this helps!
Edit:
I found this code example that can help you more: https://github.com/rodchile/RestKit-OAuth2-Client-Example