public function MiniorangeCustomerSetup::validate_otp_token in Google Authenticator / 2 Factor Authentication - 2FA 8.2
Same name and namespace in other branches
- 8 src/MiniorangeCustomerSetup.php \Drupal\miniorange_2fa\MiniorangeCustomerSetup::validate_otp_token()
Validate OTP.
File
- src/
MiniorangeCustomerSetup.php, line 163 - Contains miniOrange Customer class.
Class
- MiniorangeCustomerSetup
- @file This class represents configuration for customer.
Namespace
Drupal\miniorange_2faCode
public function validate_otp_token($transactionId, $otpToken, $customerKey, $api_Key) {
$fields = array(
'txId' => $transactionId,
'token' => $otpToken,
);
$url = MoAuthConstants::getBaseUrl() . MoAuthConstants::$AUTH_VALIDATE_API;
$json = json_encode($fields);
return MoAuthUtilities::callService($customerKey, $api_Key, $url, $json);
}