Janrain: User management platform for the social web

JREngage Class Reference

Main API for interacting with the Janrain Engage for iOS library. More...

#import <JREngage.h>

Inherits NSObject, and JRSessionDelegate-p.

List of all members.

Static Public Member Functions

Get the JREngage Instance

Methods that initialize and return the shared JREngage instance

(JREngage *) + jrEngage
(id) + jrEngageWithAppId:andTokenUrl:delegate:

Public Member Functions

Manage the Delegates

Add/remove delegates that implement the JREngageDelegate protocol

(void) - addDelegate:
(void) - removeDelegate:
Show the JREngage Dialogs

Methods that display JREngage's dialogs to initiate authentication and social publishing

(void) - showAuthenticationDialog
(void) - showAuthenticationDialogForProvider:
(void) - showAuthenticationDialogWithCustomInterfaceOverrides:
(void) - showAuthenticationDialogForProvider:withCustomInterfaceOverrides:
(void) - showSocialPublishingDialogWithActivity:
(void) - showSocialPublishingDialogWithActivity:andCustomInterfaceOverrides:
Management Authenticated Users

Methods that manage authenticated users remembered by the library

(void) - signoutUserForProvider:
(void) - signoutUserForAllProviders
(void) - alwaysForceReauthentication:
Cancel the JREngage Dialogs

Methods to cancel authentication and social publishing

(void) - cancelAuthentication
(void) - cancelPublishing
Server-side Authentication

Methods to reconfigure server-side authentication

(void) - updateTokenUrl:
Configure the User Interface

Methods used to customize the JREngage's user interface

(void) - setCustomInterfaceDefaults:

Detailed Description

Main API for interacting with the Janrain Engage for iOS library.

If you wish to include 3rd-Party Authentication and Social Publishing in your iPhone or iPad applications, you can use the JREngage class to achieve this. Prior to using the JREngage library, you must already have an application on http://rpxnow.com. This is all that is required for basic authentication, although some providers may require extra configuration (which can be done through your application's Dashboard For social publishing, you will need to configure your rpxnow application with the desired providers.

If desired, you can optionally implement server-side authentication*. When provided, the JREngage library can post the user's authentication token to a url on your server: the token url. Your server can complete authentication, access more of JREngage's API, log the authentication, etc. and the server's response will be passed back through to your iOS application.

*In the previous version of the Engage for iOS library, implementing token url that completed server-side authentication was required. This is no longer the case, although you can optionally implement the token url if you wish to continue authentication on your server.


Member Function Documentation

+ (JREngage *) jrEngage  

Shared instance of the JREngage library.

Returns:
The instance of the JREngage library once it has been created, otherwise this will return nil
+ (id) jrEngageWithAppId: (NSString*)  appId
andTokenUrl: (NSString*)  tokenUrl
delegate: (id<JREngageDelegate>)  delegate 

Initializes and returns the shared instance of the JREngage library

Parameters:
appId This is your 20-character application ID. You can find this on your application's Dashboard on http://rpxnow.com. This value cannot be nil
tokenUrl The url on your server where you wish to complete authentication. If provided, the JREngage library will post the user's authentication token to this url where it can used for further authentication and processing. When complete, the library will pass the server's response back to the your application
delegate The delegate object that implements the JREngageDelegate protocol
Returns:
The shared instance of the JREngage object initialized with the given appId, tokenUrl, and delegate. If the given appId is nil, returns nil.
- (void) addDelegate: (id<JREngageDelegate>)  delegate  

Add a JREngageDelegate to the JREngage library.

Parameters:
delegate The object that implements the JREngageDelegate protocol
- (void) removeDelegate: (id<JREngageDelegate>)  delegate  

Remove a JREngageDelegate from the JREngage library.

Parameters:
delegate The object that implements the JREngageDelegate protocol
- (void) showAuthenticationDialog  

Use this function to begin authentication. The JREngage library will pop up a modal dialog and take the user through the sign-in process.

- (void) showAuthenticationDialogForProvider: (NSString*)  provider  

Use this function to begin authentication for one specific provider. The JREngage library will pop up a modal dialog, skipping the list of providers, and take the user straight to the sign-in flow of the passed provider. The user will not be able to return to the list of providers.

Parameters:
provider The name of the provider on which the user will authenticate. For a list of possible strings, please see the List of Providers
- (void) showAuthenticationDialogWithCustomInterfaceOverrides: (NSDictionary*)  customInterfaceOverrides  

Use this function to begin authentication. The JREngage library will pop up a modal dialog, configured with the given custom interface, and take the user through the sign-in process.

Parameters:
customInterfaceOverrides A dictionary of objects and properties, indexed by the set of pre-defined custom interface keys, to be used by the library to customize the look and feel of the user interface and/or add a native login experience
Note:
Any values specified in the customInterfaceOverrides dictionary will override the corresponding values specified the dictionary passed into the setCustomInterfaceDefaults:() method.
- (void) showAuthenticationDialogForProvider: (NSString*)  provider
withCustomInterfaceOverrides: (NSDictionary*)  customInterfaceOverrides 

Use this function to begin authentication. The JREngage library will pop up a modal dialog, configured with the given custom interface and skipping the list of providers, and take the user straight to the sign-in flow of the passed provider. The user will not be able to return to the list of providers.

Parameters:
provider The name of the provider on which the user will authenticate. For a list of possible strings, please see the List of Providers
customInterfaceOverrides A dictionary of objects and properties, indexed by the set of pre-defined custom interface keys, to be used by the library to customize the look and feel of the user interface and/or add a native login experience
Note:
Any values specified in the customInterfaceOverrides dictionary will override the corresponding values specified the dictionary passed into the setCustomInterfaceDefaults:() method.
- (void) showSocialPublishingDialogWithActivity: (JRActivityObject*)  activity  

Use this function to begin social publishing. The JREngage library will pop up a modal dialog and take the user through the sign-in process, if necessary, and share the given JRActivityObject.

Parameters:
activity The activity you wish to share
- (void) showSocialPublishingDialogWithActivity: (JRActivityObject*)  activity
andCustomInterfaceOverrides: (NSDictionary*)  customInterfaceOverrides 

Use this function to begin social publishing. The JREngage library will pop up a modal dialog, configured with the given custom interface, take the user through the sign-in process, if necessary, and share the given JRActivityObject.

Parameters:
activity The activity you wish to share
customInterfaceOverrides A dictionary of objects and properties, indexed by the set of pre-defined custom interface keys, to be used by the library to customize the look and feel of the user interface and/or add a native login experience
Note:
Any values specified in the customInterfaceOverrides dictionary will override the corresponding values specified the dictionary passed into the setCustomInterfaceDefaults:() method.
- (void) signoutUserForProvider: (NSString*)  provider  

Tell JREngage to forget that a user is already signed in with the given provider.

Parameters:
provider The name of the provider on which the user authenticated. For a list of possible strings, please see the List of Providers
- (void) signoutUserForAllProviders  

Tell JREngage to forget that a user is signed in with all the Social Providers

- (void) alwaysForceReauthentication: (BOOL)  force  

Use this function to toggle whether or not the library should force the user to reauthenticate for all providers.

Parameters:
force YES if the library should force reauthentication for all providers or NO if the library should perform the default behavior
- (void) cancelAuthentication  

Use this functions if you need to cancel authentication for any reason.

- (void) cancelPublishing  

Use this functions if you need to cancel publishing for any reason.

- (void) updateTokenUrl: (NSString*)  tokenUrl  

Use this function to specify a different tokenUrl than the one with which you initiated the library. On this URL, you can continue any server-side authentication, and send your server's response back to the library. The library will pass your server's response back to your application with the jrAuthenticationDidReachTokenUrl:withResponse:andPayload:forProvider:() method

Parameters:
tokenUrl The valid URL on your web server where the library will POST the authentication token

The documentation for this class was generated from the following files:
  • /Users/lillialexis/iPhone/engage.iphone/JREngage/classes/JREngage+CustomInterface.m
  • /Users/lillialexis/iPhone/engage.iphone/JREngage/classes/JREngage.h
  • /Users/lillialexis/iPhone/engage.iphone/JREngage/classes/JREngage.m
Copyright © 2017 Janrain, Inc.