You are here

public function GALoginHotpValidation::getHotpCounter in Google Authenticator login 8

Get the HOTP counter.

Return value

int The current value of the HOTP counter, or 1 if no value was found.

1 call to GALoginHotpValidation::getHotpCounter()
GALoginHotpValidation::validate in src/Plugin/TfaValidation/GALoginHotpValidation.php
Validate code.

File

src/Plugin/TfaValidation/GALoginHotpValidation.php, line 332

Class

GALoginHotpValidation
HOTP validation class for performing HOTP validation.

Namespace

Drupal\ga_login\Plugin\TfaValidation

Code

public function getHotpCounter() {
  return $this
    ->getUserData('tfa', 'tfa_hotp_counter', $this->uid, $this->userData) ?: 1;
}