Show TOC

Executing Logon OperationsLocate this document in the navigation structure

Additional operations provided by the logon components.


After you initialize MAFLogonUIViewManager, present the MAF logon UI screens. The View Manager maintains a reference to the LogonMediator (which, in the code examples, may also be called the logonManager). To present a particular screen, call the corresponding operation on the LogonMediator, which notifies the View Manager of MAFLogonUING that the action requires input. The View Manager generates and presents the input screen. The View Manager then calls back the LogonMediator in MAFLogonManagerNG and executes the next step of the requested operation.

To present the logon screen, call the MAFViewManager logon method:
// call this method from any place in your application code
- (void)doLogon {
	[logonUIViewManager.logonManager logon];

This presents the default logon screen.

Enter the input that corresponds to your onboarding scenario. Tap the Log In button to trigger the registration process, which has these possible outcomes:
  • The request fails with an error message.
  • Registration succeeds and the success delegate is called on MAFLogonNGDelegate.
  • Registration succeeds and the App Passcode screen is presented.
The MAFLogonManagerNG provides a build-time configuration of the structure and content of the MAF logon UI. You can:
  • Hide the advanced registration section
  • Hide each field individually
  • Set a default value for each field individually
Users cannot change the default values of hidden fields, but the onboarding process uses these values.
App Passcode

Upon successful registration, the device user sees the Set Passcode screen. This is the second screen of the logon process, unless the Afaria configuration prohibits the usage of app passcodes, or if the password policy is disabled on SAP Mobile Platform. The password policy is set for the application connection template on the SAP Mobile Platform server by the IT administrator. The confirmation must match the app passcode, and the app passcode must match the password policy. This screen appears only if the password policy is enabled. The MAFLogonUING checks the password policy and presents the screen as appropriate.

Delete Registration
Call the deleteUser operation to delete all registration information from the device, so the user can start using the application anew.
// call this method from any place in your application code
- (void)doDelete {
	[logonUIViewManager.logonManager deleteUser];
When you call the logon manager’s deleteUser method, the Delete Registration Confirmation UIAlertView is presented.
Lock Secure Store
To close the secure store and present the App Passcode Unlock screen, call lockSecureStore from your application:
// call this method from any place in your application code
- (void)doLockSecureStore {
    [logonUIViewManager.logonManager lockSecureStore];
Change App Passcode
To update the secure store passcode, present the Change App Passcode screen:
// call this method from any place in your application code
- (void)doChangeAppPasscode {
    [logonUIViewManager.logonManager changeSecureStorePassword];
Update Back-End Password
When device users change their back-end passwords, MAF Logon Manager must get the new passwords. This method call displays the Update Backend Password screen:
// call this method from any place in your application code
- (void)doChangeBackendPassword {
    [logonUIViewManager.logonManager changeBackendPassword];
Reviewing Login Data
To review registration information, present the Login Data screen by executing the Login Data operation:
// call this method from any place in your application code
- (void)doPresentRegInfo {
    [logonUIViewManager.logonManager registrationInfo];
This method call displays the Registration Information Screen. This screen displays, in read-only mode, every input for the login screen during registration.
Storing the Application Connection ID
With this code, you can store the application connection ID after a successful logon:
MAFLogonRegistrationData* registrationData = [self.logonUIViewManager.logonManagerregistrationDataWithError:&error];
        appcid = registrationData.applicationConnectionId;