I am executing the following method for my rails APIs and should send an authorization token
def restrict_access
authenticate_or_request_with_http_token do |token, options|
ApiKey.exists?(access_token: token)
end
end
The marker works when passing through curl in a header with the format:
-H 'Authorization: Token token = "tokenvalue"'
I find it difficult to translate this for my AFHTTPRequestOperationManager. How would I determine the following value equal to the above query?
[self setRequestSerializer:[AFHTTPRequestSerializer serializer]];
[self.requestSerializer setValue:@"tokenvalue" forHTTPHeaderField:@"Authorization: Token"];
source
share