Changing the User PIN Flow for iOS

casan141saas
As stated in Activation Flow, a user sets up a user PIN while activating CA Strong Authentication for the first account on the mobile. This user PIN is used for all accounts for which the user activates CA Strong Authentication.
A user can change the user PIN at any time.
This section covers the following topics:
For information about the APIs mentioned in these topics, see API Reference for iOS.
Steps in the Changing the User PIN Flow
The following steps take place when the user changes the PIN:
  1. The user taps the menu in the upper-right corner of the page.
    Changing_PIN_01_Menu.png
  2. From the menu, the user taps Change PIN.
  3. The app displays the prompt for changing the PIN.
    Changing_PIN_02_Prompt.png
  4. The user submits the old and new PINs.
  5. After the old PIN is verified, the new PIN is set. The app displays a success message.
Changing the User PIN Flow Diagram
The following flow diagram shows the sequence of API calls that take place when the user uses the Changing the User PIN flow.
iOS - Changing the User PIN
iOS - Changing the User PIN
Sample Code for the Changing the User PIN Flow
The following is sample code for the Changing the User PIN flow:
// App prompts the user to submit old and new PINs
// App submits the old and new PINs to the SDK
AuthenticationHandler * authHandler = [[AuthenticationHandler alloc] init];
ChangePINResponse * changePinRespone = [authHandler changePIN:
o
ldPinTextField.text :nPinTextField.text];
// App displays message based on the status of ChangePINResponse object
if([changePinRespone.status isEqualToString:SUCCESS]) {
//App displays success message to user
} else {
//App displays error message based on status and error_code
// of changePinResponse object
}