NXOAuth2ConnectionDelegate Protocol Reference
Conforms to | NSObject NXOAuth2TrustDelegate |
Declared in | NXOAuth2ConnectionDelegate.h |
Tasks
-
– oauthConnection:didReceiveResponse:
The connection did receive a response.
-
– oauthConnection:didFinishWithData:
The connection did finish and recieved the whole data.
-
– oauthConnection:didFailWithError:
The connection did fail with an error The domain of the error is NXOAuth2ErrorDomain. Check the error code to see if it's been an HTTP error (NXOAuth2HTTPErrorCode). If so you can get the original error from the userInfo with the key NXOAuth2HTTPErrorKey
-
– oauthConnection:didReceiveData:
The connection recieved a new chunk of bytes. Note: use connection.data.length and connection.expectedContentLength to get the overall progress
-
– oauthConnection:didSendBytes:ofTotal:
The connection did send new data
-
– oauthConnection:didReceiveRedirectToURL:
The connection received a redirect response
Instance Methods
oauthConnection:didFailWithError:
The connection did fail with an error
The domain of the error is NXOAuth2ErrorDomain.
Check the error code to see if it's been an HTTP error (NXOAuth2HTTPErrorCode). If so you can get the original error from the userInfo with the key NXOAuth2HTTPErrorKey
- (void)oauthConnection:(NXOAuth2Connection *)connection didFailWithError:(NSError *)error
Discussion
The connection did fail with an error
The domain of the error is NXOAuth2ErrorDomain.
Check the error code to see if it's been an HTTP error (NXOAuth2HTTPErrorCode). If so you can get the original error from the userInfo with the key NXOAuth2HTTPErrorKey
Declared In
NXOAuth2ConnectionDelegate.h
oauthConnection:didFinishWithData:
The connection did finish and recieved the whole data.
- (void)oauthConnection:(NXOAuth2Connection *)connection didFinishWithData:(NSData *)data
Discussion
The connection did finish and recieved the whole data.
Declared In
NXOAuth2ConnectionDelegate.h
oauthConnection:didReceiveData:
The connection recieved a new chunk of bytes.
Note: use connection.data.length and connection.expectedContentLength to get the overall progress
- (void)oauthConnection:(NXOAuth2Connection *)connection didReceiveData:(NSData *)data
Discussion
The connection recieved a new chunk of bytes.
Note: use connection.data.length and connection.expectedContentLength to get the overall progress
Declared In
NXOAuth2ConnectionDelegate.h
oauthConnection:didReceiveRedirectToURL:
The connection received a redirect response
- (void)oauthConnection:(NXOAuth2Connection *)connection didReceiveRedirectToURL:(NSURL *)redirectURL
Discussion
The connection received a redirect response
Declared In
NXOAuth2ConnectionDelegate.h
oauthConnection:didReceiveResponse:
The connection did receive a response.
- (void)oauthConnection:(NXOAuth2Connection *)connection didReceiveResponse:(NSURLResponse *)response
Discussion
The connection did receive a response.
This method is not called if the response was a 401 with an expired token & a refresh token.
If so, then the token is refreshed & the connection will be automagically retried.
Declared In
NXOAuth2ConnectionDelegate.h