NXOAuth2Client Class Reference
| 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
- oauth2 draft 10 http://tools.ietf.org/html/draft-ietf-oauth-v2-10
- not thread save
Tasks
Other Methods
-
persistentIf set to NO, the access token is not stored any keychain, will be removed if it was. Defaults to YES
property -
– initWithClientID:clientSecret:authorizeURL:tokenURL:delegate:Initializes the Client
-
– authorizationURLWithRedirectURL:parameters:Authenticate usind a web URL (Web Server Flow) returns the URL to be opened to get access grant
-
– authenticateWithUsername:password:Authenticate with username & password (User Credentials Flow)
Other Methods
-
– oauthConnection:didFinishWithData:The connection did finish and recieved the whole data.
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 persistentDiscussion
If set to NO, the access token is not stored any keychain, will be removed if it was. Defaults to YES
Declared In
NXOAuth2Client.hInstance Methods
authenticateWithUsername:password:
Authenticate with username & password (User Credentials Flow)
- (void)authenticateWithUsername:(NSString *)username password:(NSString *)passwordDiscussion
Authenticate with username & password (User Credentials Flow)
Declared In
NXOAuth2Client.hauthorizationURLWithRedirectURL: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 *)parametersDiscussion
Authenticate usind a web URL (Web Server Flow) returns the URL to be opened to get access grant
Declared In
NXOAuth2Client.hinitWithClientID:clientSecret:authorizeURL:tokenURL:delegate:
Initializes the Client
- (id)initWithClientID:(NSString *)clientId clientSecret:(NSString *)clientSecret authorizeURL:(NSURL *)authorizeURL tokenURL:(NSURL *)tokenURL delegate:(NSObject<NXOAuth2ClientDelegate> *)delegateDiscussion
Initializes the Client
Declared In
NXOAuth2Client.hoauthConnection: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 *)errorDiscussion
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