Scenario: Authenticating a user. Grab the cookie, set the cookie for other requests. Fine. What I can't immediately figure out is how to handle when the authentication fails without push my next view onto the screen. if my response is {errors:{password:does not match}} should i parse this response too and create a condition accordingly? Should I simply check the response code? I'm making this to difficult, I can tell. I added my next view in:
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
so, when the connection finishes, it naturally pushes the next view. I'd like to prevent it from ever getting here if the authentication fails too. Maybe I shouldn't push my next view from here. Where then?