You are here

public function MobileNumberTfa::verifyCode in Mobile Number 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/TfaValidation/MobileNumberTfa.php \Drupal\mobile_number\Plugin\TfaValidation\MobileNumberTfa::verifyCode()

Verifies the given code with this session's verification token.

Parameters

string $code: Code.

Return value

bool Verification status.

1 call to MobileNumberTfa::verifyCode()
MobileNumberTfa::validateForm in src/Plugin/TfaValidation/MobileNumberTfa.php
Validate form.

File

src/Plugin/TfaValidation/MobileNumberTfa.php, line 194
MobileNumberTfa.php

Class

MobileNumberTfa
Class MobileNumberTfa is a validation and sending plugin for TFA.

Namespace

Drupal\mobile_number\Plugin\TfaValidation

Code

public function verifyCode($code) {
  return $this->isValid = $this->mobileNumberUtil
    ->verifyCode($this->mobileNumber, $code, $this->verificationToken);
}