سؤال

What's the best practice to Logout and clean up the Authorization Header, etc. with RESTKit 0.20?

Will this method suffice?

RKObjectManager *objectManager = [self getObjectManager];
[objectManager.HTTPClient clearAuthorizationHeader];
هل كانت مفيدة؟

المحلول

If you use one of the setAuthorizationHeaderField* methods on the http client to add the authorisation then calling clearAuthorizationHeader is the correct approach to take.

If you explicitly set the header or parameter then you need to clear that header or stored attribute.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top