Inherits from NSObject
Conforms to NXOAuth2ConnectionDelegate
Declared in NXOAuth2Client.h
NXOAuth2Client.m

Overview

The OAuth 2.0 client Only supports WebServer & Password flow at the moment

Tasks

Other Methods

Other Methods

Other 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
    

Properties

persistent

If set to NO, the access token is not stored any keychain, will be removed if it was. Defaults to YES

@property (nonatomic, assign, readwrite, getter=isPersistent) BOOL persistent

Discussion

If set to NO, the access token is not stored any keychain, will be removed if it was. Defaults to YES

Declared In

NXOAuth2Client.h

Instance Methods

authenticateWithUsername:password:

Authenticate with username & password (User Credentials Flow)

- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password

Discussion

Authenticate with username & password (User Credentials Flow)

Declared In

NXOAuth2Client.h

authorizationURLWithRedirectURL:parameters:

Authenticate usind a web URL (Web Server Flow) returns the URL to be opened to get access grant

- (NSURL *)authorizationURLWithRedirectURL:(NSURL *)redirectURL parameters:(NSDictionary *)parameters

Discussion

Authenticate usind a web URL (Web Server Flow) returns the URL to be opened to get access grant

Declared In

NXOAuth2Client.h

initWithClientID:clientSecret:authorizeURL:tokenURL:delegate:

Initializes the Client

- (id)initWithClientID:(NSString *)clientId clientSecret:(NSString *)clientSecret authorizeURL:(NSURL *)authorizeURL tokenURL:(NSURL *)tokenURL delegate:(NSObject<NXOAuth2ClientDelegate> *)delegate

Discussion

Initializes the Client

Declared In

NXOAuth2Client.h

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