AdobeUXAuthManager Class Reference
Inherits from | NSObject |
Declared in | AdobeUXAuthManager.h |
Overview
AdobeUXAuthManager is the class through which authentication with the Adobe Creative Cloud is managed. This is starting point for using the Creative SDK. All clients are required to call the setAuthenticationParametersWithClientID:withClientSecret: method before using the CreativeSDK.
Using this class, you can:
- Specify the clientID and clientSecret as issued by Adobe.
- Query for authentication status.
- Get the user profile of the currently authenticated user.
- Logout the currently logged in user.
You need to use the sharedManager property for all the interactions.
The Login and Logout notifications are sent through the NSNotificationManager class.
The NSNotificationManager will send
extern NSString* const AdobeAuthManagerLoggedInNotification
when a user login occurs and
extern NSString* const AdobeAuthManagerLoggedOutNotification
when a user logout occurs.
The AdobeUXAuthManager handles creating the UI for login and account creation automatically. Logins are cached such that when your application starts up, it can login automatically.
The Creative SDK does not force login and logout completion block to run on the main thread.
Note: Many Creative SDK APIs will require an authenticated user so nearly all other classes will rely upon this class.
Tasks
-
authenticated
property -
userProfile
property -
redirectURL
property -
authDelegate
property -
+ sharedManager
-
– setAuthenticationParametersWithClientID:withClientSecret:
-
– setAuthenticationParametersWithClientID:clientSecret:additionalScopeList:
-
– setAuthenticationParametersWithClientID:clientSecret:enableSignUp:
-
creativeCloudEventLoggingMode
property -
– login:onSuccess:onError:
-
– logout:onError:
-
– openContinuableAuthenticationURLForError:parentViewController:animate:onSuccess:onError:
-
– isSendingUsageData
-
– sendUsageData:completion:
Properties
authDelegate
The authentication delegate allows control over the user interaction conditions reported by the authentication service. For example, for email verification and terms of use update. Notice that this is a weak reference.
@property (nonatomic, weak) id<AdobeUXAuthDelegate> authDelegate
Discussion
The authentication delegate allows control over the user interaction conditions reported by the authentication service. For example, for email verification and terms of use update. Notice that this is a weak reference.
Declared In
AdobeUXAuthManager.h
authenticated
Returns whether or not there is a currently logged in user.
@property (nonatomic, readonly, assign, getter=isAuthenticated) BOOL authenticated
Return Value
YES if there is an authenticated user, NO if there is no currently logged in user.
Discussion
Returns whether or not there is a currently logged in user.
Declared In
AdobeUXAuthManager.h
creativeCloudEventLoggingMode
Controls if and how event data gets logged with the Creative Cloud.
@property (nonatomic) AdobeCCEventLoggingMode creativeCloudEventLoggingMode
Discussion
Controls if and how event data gets logged with the Creative Cloud.
Default value is AdobeCCEventLoggingModeDefault.
Must set this before the call to setAuthenticationParametersWithClientID:…
Declared In
AdobeUXAuthManager.h
redirectURL
The redirect URL to use during signin/signup.
@property (nonatomic, strong) NSURL *redirectURL
Discussion
The redirect URL to use during signin/signup.
clientIDs supplied by Adobe may be configured to use a clientID-specific redirectURL. In such cases, the developer must use this property to prime the Creative SDK with the provided redirectURL. The redirectURL is used internally by the Creative SDK to complete signin/signup.
Declared In
AdobeUXAuthManager.h
userProfile
Gets the user profile of the currently logged in user.
@property (atomic, readonly, strong) AdobeAuthUserProfile *userProfile
Return Value
the user profile of the currently logged in user or nil if no user is currently logged in.
Discussion
Gets the user profile of the currently logged in user.
See Also
Declared In
AdobeUXAuthManager.h
Instance Methods
isSendingUsageData
Tells whether the usage data is being reported.
- (BOOL)isSendingUsageData
Discussion
Tells whether the usage data is being reported.
Declared In
AdobeUXAuthManager.h
login:onSuccess:onError:
Logs in the user. This method creates a view that handles all aspects of account login and account creation.
- (void)login:(UIViewController *)parentViewController onSuccess:(void ( ^ ) ( AdobeAuthUserProfile *profile ))successBlock onError:(void ( ^ ) ( NSError *error ))errorBlock
Parameters
- parentViewController
the view controller that will host any UI elements needed for login
- successBlock
the block of code that gets called upon login success
- errorBlock
the block of code that gets called upon login failure
Discussion
Logs in the user. This method creates a view that handles all aspects of account login and account creation.
Note: This call is not explicity needed to be called. If authentication is required, it will be called later.
Declared In
AdobeUXAuthManager.h
logout:onError:
Logs out the currently logged in user.
- (void)logout:(void ( ^ ) ( void ))successBlock onError:(void ( ^ ) ( NSError *error ))errorBlock
Parameters
- successBlock
the block of code that gets called upon logout success
- errorBlock
the block of code that gets called upon logout failure
Discussion
Logs out the currently logged in user.
Declared In
AdobeUXAuthManager.h
openContinuableAuthenticationURLForError:parentViewController:animate:onSuccess:onError:
Contact the authentication provider to open the user interaction page. Typically this method is called when handling authentication events that require user interaction, e.g., email verification and terms of use updates. The client app implements the detectedContinuableAuthenticationEvent delegate to receive the error information (@see AdobeUXAuthDelegate). The delegate calls this method when the client is ready to display the view controller. The code must be called on the main thread.
- (void)openContinuableAuthenticationURLForError:(NSString *)errorCode parentViewController:(UIViewController *)parentViewController animate:(BOOL)animate onSuccess:(void ( ^ ) ( void ))successBlock onError:(void ( ^ ) ( NSError *error ))errorBlock
Parameters
- errorCode
authentication user interaction error
- parentViewController
view controller that will host the UI elements needed to open the user interaction URL
- animate
YES to present/hide the sign up view with an aniamation
- successBlock
block of code that gets called upon success
- errorBlock
block of code that gets called upon failure
Discussion
Contact the authentication provider to open the user interaction page. Typically this method is called when handling authentication events that require user interaction, e.g., email verification and terms of use updates. The client app implements the detectedContinuableAuthenticationEvent delegate to receive the error information (@see AdobeUXAuthDelegate). The delegate calls this method when the client is ready to display the view controller. The code must be called on the main thread.
Declared In
AdobeUXAuthManager.h
sendUsageData:completion:
Enables/Disables the sending of usage data.
- (void)sendUsageData:(BOOL)enable completion:(void ( ^ ) ( BOOL success , NSError *error ))completion
Parameters
- enable
Determines whether to start or stop the reporting.
- completion
The block of code that gets called upon completion.
Discussion
Enables/Disables the sending of usage data.
Declared In
AdobeUXAuthManager.h
setAuthenticationParametersWithClientID:clientSecret:additionalScopeList:
Sets the authentication parameters for Creative Cloud Authentication.
- (void)setAuthenticationParametersWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret additionalScopeList:(NSArray *)scopeList
Parameters
- clientID
The clientID as supplied to the application developer by Adobe
- clientSecret
The client secret for the application as supplied to the application developer by Adobe
- scopeList
nil for the default scope or an NSArray of additional app specific scope NSStrings (advanced)
Discussion
Sets the authentication parameters for Creative Cloud Authentication.
This method must be called once at application startup, typically in the application delegate. It must be called before any other authentication calls.
This method does not initiate a login. If needed, login is triggered when Creative Cloud services are accessed or when AdobeUXAuthManager login:onSuccess:onError is explicitly called.
Currently Apple requires supporting in-app purchase before enabling sign up. Contact Adobe to learn about the in-app purchases you can offer through the Creative SDK. This method enables user sign up.
Declared In
AdobeUXAuthManager.h
setAuthenticationParametersWithClientID:clientSecret:enableSignUp:
Sets the authentication parameters for Creative Cloud Authentication.
- (void)setAuthenticationParametersWithClientID:(NSString *)clientID clientSecret:(NSString *)clientSecret enableSignUp:(BOOL)enableSignUp
Parameters
- clientID
The clientID as supplied to the application developer by Adobe
- clientSecret
The client secret for the application as supplied to the application developer by Adobe
- enableSignUp
Ignored. This method always enables user sign up.
Discussion
Sets the authentication parameters for Creative Cloud Authentication.
This method has been deprecated and will be obsoleted soon. Use setAuthenticationParametersWithClientID:withClientSecret: instead.
Declared In
AdobeUXAuthManager.h
setAuthenticationParametersWithClientID:withClientSecret:
Sets the authentication parameters for Creative Cloud Authentication.
- (void)setAuthenticationParametersWithClientID:(NSString *)clientID withClientSecret:(NSString *)clientSecret
Parameters
- clientID
The clientID as supplied to the application developer by Adobe
- clientSecret
The client secret for the application as supplied to the application developer by Adobe
Discussion
Sets the authentication parameters for Creative Cloud Authentication.
This method must be called once at application startup, typically in the application delegate. It must be called before any other authentication calls.
This method does not initiate a login. If needed, login is triggered when Creative Cloud services are accessed or when AdobeUXAuthManager login:onSuccess:onError is explicitly called.
Currently Apple requires supporting in-app purchase before enabling sign up. Contact Adobe to learn about the in-app purchases you can offer through the Creative SDK. This method enables user sign up.
Declared In
AdobeUXAuthManager.h