Conforms to NSObject
Declared in LUOAuth2ViewController.h

Overview

The LUOAuth2ViewControllerDelegate is used with LUOAuth2ViewController to notify you when an action occurs.

Instance Methods

OAuth2ViewController:didFailWithErrorCode:errorDescription:

Called if the server returned an error.

- (void)OAuth2ViewController:(LUOAuth2ViewController *)OAuth2ViewController didFailWithErrorCode:(NSString *)errorCode errorDescription:(NSString *)errorDescription

Parameters

OAuth2ViewController

The OAuth2 controller that received the error.

errorCode

An error code of the form “invalid_scope”.

errorDescription

A human-reable error message.

Discussion

Called if the server returned an error.

Declared In

LUOAuth2ViewController.h

OAuth2ViewController:didSucceedWithAccessToken:

Called when authorization is successful.

- (void)OAuth2ViewController:(LUOAuth2ViewController *)OAuth2ViewController didSucceedWithAccessToken:(NSString *)accessToken

Parameters

OAuth2ViewController

The OAuth2 controller that was authorizing the user.

accessToken

An access token for the authorizing user. Setting accessToken on [LUAPIClient sharedClient] to this token will allow the access token to be used on subsequent LevelUp API calls.

Discussion

Called when authorization is successful.

Declared In

LUOAuth2ViewController.h

OAuth2ViewControllerDidFinishLoad:

An optional method which is called when the web view finishing loading a page. This could be used to hide a loading indicator, for example.

- (void)OAuth2ViewControllerDidFinishLoad:(LUOAuth2ViewController *)OAuth2ViewController

Parameters

OAuth2ViewController

The OAuth2 controller that is authorizing the user.

Discussion

An optional method which is called when the web view finishing loading a page. This could be used to hide a loading indicator, for example.

Declared In

LUOAuth2ViewController.h

OAuth2ViewControllerDidStartLoad:

An optional method which is called when the web view starts loading a page. This could be used to show a loading indicator, for example.

- (void)OAuth2ViewControllerDidStartLoad:(LUOAuth2ViewController *)OAuth2ViewController

Parameters

OAuth2ViewController

The OAuth2 controller that is authorizing the user.

Discussion

An optional method which is called when the web view starts loading a page. This could be used to show a loading indicator, for example.

Declared In

LUOAuth2ViewController.h

OAuth2ViewControllerWasCancelled:

An optional method which is called when the user cancels the dialog, if it was displayed inside a navigation controller, such as the one returned by navigationDialog. Typically this would be the time when the controller should be dismissed.

- (void)OAuth2ViewControllerWasCancelled:(LUOAuth2ViewController *)OAuth2ViewController

Parameters

OAuth2ViewController

The OAuth2 controller that is authorizing the user.

Discussion

An optional method which is called when the user cancels the dialog, if it was displayed inside a navigation controller, such as the one returned by navigationDialog. Typically this would be the time when the controller should be dismissed.

Declared In

LUOAuth2ViewController.h