Constructors

Methods

  • to cancel mfa process, call cancelMFA().

    Parameters

    Returns Promise<any>

    cidaasVerificationService.cancelMFA({
    exchange_id: 'exchange id from initiateMFA() response',
    reason: 'reason of mfa cancelation',
    type: 'authentication type e.g. email'
    }).then(function (response) {
    // your success code here
    }).catch(function(ex) {
    // your failure code here
    });
  • to see details of configured verification type, call checkVerificationTypeConfigured().

    Returns Promise<any>

    cidaasVerificationService.checkVerificationTypeConfigured({
    request_id: 'your request id',
    email: 'your email',
    verification_type: 'email'
    }).then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • to configure friendly name, call configureFriendlyName Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/f0i458vm5zo6z-add-a-friendly-name for more details.

    Parameters

    Returns Promise<any>

    const options = {
    sub: 'your sub;
    * friendly_name: 'your friendly name';
    }
    }
    const trackId = 'your track id'
    const method = 'email'

    cidaasVerificationService.configureFriendlyName(options, trackId, method)
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • to finish configuring verification process, call configureVerification Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/vurqjgv46yyid-initiate-verification-setup-authenticate for more details.

    Parameters

    Returns Promise<any>

    const options = {
    exchange_id: 'your exchange id';
    sub: 'your sub;
    * pass_code: 'your pass code';
    }
    }
    const method = 'email'

    cidaasVerificationService.initiateVerification(options, method)
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • to finish enrollment process of new multi factor authentication, call enrollVerification(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/20ec76e937b27-enroll-physical-verification-setup for more details.

    Parameters

    Returns Promise<any>

    const fidoPayload = {
    sub: 'your sub',
    exchange_id: 'exchange_id from initiateEnrollment()',
    verification_type: 'fido2',
    fido2_client_response: {
    client_response: 'client_response from doing fido process',
    fidoRequestId: 'fidoRequestId from initiateEnrollment',
    }
    }
    cidaasVerificationService.enrollVerification(fidoPayload)
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • To get list of all verification type configured, call getAllVerificationList(). access_token must be passed as function parameter.

    Parameters

    Returns Promise<any>

    cidaasVerificationService.getAllVerificationList()
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • To get all configured multi factor authentication, call getMFAList().

    As Parameter, you need to pass request id & one of the following: email or mobile phone or username.

    In case you are in prelogin page and don't have user information yet (such as mfa-required & account-verification page), you could pass request id & masked sub (one of the following: sub or q), depends on which one is available in the query parameter generated by cidaas.

    Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/ee688a9c52b63-list-of-configured-verification-methods for more details.

    Parameters

    Returns Promise<any>

    cidaasVerificationService.getMFAList({
    request_id: 'your request id',
    email: 'your email'
    }).then(function (response) {
    // the response will give you list of configured multi factor authentication
    }).catch(function(ex) {
    // your failure code here
    });
  • To initiate the account verification, call initiateAccountVerification(). This will send verification code email or sms or ivr based on the verificationMedium you mentioned. Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/cgans5erj5alg-init-account-verification for more details.

    Returns void

    cidaasVerificationService.initiateAccountVerification({
    verificationMedium: 'email',
    requestId: 'your requestId',
    processingType: ProcessingType.Code,
    email: 'your email'
    }).then(function (response) {
    // the response will give you account verification details.
    }).catch(function(ex) {
    // your failure code here
    });
  • To initiate enrollment of new multi factor authentication, call initiateEnrollment(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/branches/master/f85aef6754714-initiate-physical-verification-setup for more details.

    Parameters

    Returns Promise<any>

    const options = {
    verification_type: 'one of verification_type such as fido2, face, ivr',
    deviceInfo: {
    deviceId: '',
    location: {lat: '', lon: ''}
    }
    }

    cidaasVerificationService.initiateEnrollment(options)
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • to initiate multi factor auhentication, call initiateMFA(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/2a3ea581bb249-initiate-verification for more details.

    Parameters

    Returns Promise<any>

    const options = {
    request_id: 'your request id',
    usage_type: 'PASSWORDLESS_AUTHENTICATION',
    type: 'email'
    email: 'your email'
    }
    }

    cidaasVerificationService.initiateMFA(options)
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • to initiate verification process, call initiateVerification Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/odmtzu2e53f5k-initiate-verification-enrollment for more details.

    Parameters

    Returns Promise<any>

    const options = {
    mobile_number: 'your mobile number',
    }
    }
    const trackId = 'your track id'
    const method = 'email'

    cidaasVerificationService.initiateVerification(options, trackId, method)
    .then(function (response) {
    // type your code here
    })
    .catch(function (ex) {
    // your failure code here
    });
  • To complete the verification, call verifyAccount(). Please refer to the api document https://docs.cidaas.com/docs/cidaas-iam/r8h9mvavvw2e6-verify-account for more details.

    Parameters

    Returns Promise<any>

    cidaasVerificationService.verifyAccount({
    accvid: 'your accvid', // which you will get on initiate account verification response
    code: 'your code in email or sms or ivr'
    }).then(function (response) {
    // the response will give you account verification ID and unique code.
    }).catch(function(ex) {
    // your failure code here
    });