You are here

public function MiniorangeSAMLCustomer::validateOtp in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

Validate OTP.

File

src/MiniorangeSAMLCustomer.php, line 106
Contains miniOrange Customer class.

Class

MiniorangeSAMLCustomer

Namespace

Drupal\miniorange_saml

Code

public function validateOtp($transaction_id) {
  $url = MiniorangeSAMLConstants::AUTH_VALIDATE_API;
  $fields = array(
    'txId' => $transaction_id,
    'token' => $this->otpToken,
  );
  $api = new MoAuthApi();
  $header = $api
    ->getHttpHeaderArray();
  return $api
    ->makeCurlCall($url, $fields, $header);
}