title: How to use AFNetworking 2 with Digest Authentication
body: <p>I've been searching for "AFNetworking 2 with Digest Authentication" for a while and haven't found useful discussions about it (except <a href="https://github.com/AFNetworking/AFNetworking/issues/551">this one</a>, but unfortunately it looks like it's for AFNetworking 1).</p>
  
  <p>Here's my code without authentication:</p>
  
  <pre><code>NSString* apiURL = @"https://api.example.com/WS.asmx";
  AFHTTPSessionManager* manager = [AFHTTPSessionManager manager];
  manager.requestSerializer = [AFJSONRequestSerializer serializer];
  [manager
      GET:apiURL 
      parameters: [NSDictionary dictionaryWithObjectsAndKeys:@"ID", 1234 , nil]
      success:^(NSURLSessionDataTask *task, id responseObject) {
          NSLog(@"JSON: %@", responseObject);
      }
      failure:^(NSURLSessionDataTask *task, NSError *error) {
          NSLog(@"WS request failed: %@", error);
      }
  ];
  </code></pre>
  
  <p>Where and how can Digest Auth code kick in?</p>