IMIconnect Developer Hub

Welcome to the IMIconnect Developer Hub. You'll find all the resources to help you get started with IMIconnect quickly. We are here to support you if you get stuck. Let's jump right in!

Get Started

Authentication

IMIconnect Two Factor Authentication (2FA) is an authentication process in which the user provides two means of identification from separate categories of credentials. It provides additional security. For example, a banking transaction a user may be asked to provide one time password (OTP) after they login with their username and password.

IMIconnect SDK provides Two Factor Authentication (2FA) service for mobile applications to validate their customer id (CRN and MSISDN) that are registered with IMIconnect profile manager. The OTP is valid for 30 minutes.

This interface has the following class:

ICUserAuthentication

This class exposes functionality which enables user authentication through a One Time Password sent over SMS. Two Factor Authentication (2FA) can also be implemented using this class.

Methods

generatePinForUserId

This method is used to generate a pin and sent it to the user through SMS allowing him to authenticate with pin than the traditional login/password. The phone number must be provided when creating a user profile. If generation succeeds, error in completionHandler will be nil.

  Syntax: + (void)generatePinForUserId:(NSString *)userId completionHandler:(void (^)(NSError *error)) completionHandler;

  Parameters:

Parameter
Type
Description

userId

NSString

Specifies a user id or customer id (CRN and MSISDN) that are registered with IMIconnect profile manager.

  Example:

[ICUserAuthentication generatePinForUserId: userId
    completionHandler: ^ (NSError * error) {
        if (error) {
            NSLog(@ "Failed to generate PIN. Reason: %@", error.localizedDescription);
        } else {
            NSLog(@ "Generation succeeded.");
        }
    }
];

validatePin

This method is used to validate the pin with the IMIconnect platform. The result is reported through the callback specified when constructing the ICUserAuthentication instance. If validation succeeds, error in completionHandler will be nil.

  Syntax: + (void)validatePin:(NSString *)pin forUserId:(NSString *)userId completionHandler:(void (^)(NSError *error))completionHandler;

  Parameters:

Parameter
Type
Description

pin

NSString

Specifies the pin number to be validated that is received as SMS.

userId

NSString

Specifies a user id or customer id (CRN and MSISDN) that are registered with IMIconnect profile manager.

  Example:

[ICUserAuthentication validatePin: pin
    forUserId: userId
    completionHandler: ^ (NSError * error) {
        if (error) {
            NSLog(@ "Failed to authenticate the user. Reason: %@", error.localizedDescription);
        } else {
            NSLog(@ "Authentication succeeded.");
        }
    }
];

Authentication


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.