Rename valid_for property to period

This commit is contained in:
Bubka 2021-10-08 00:28:41 +02:00
parent f19fb0adad
commit 52f9867fee
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class OtpDto
public ?int $generated_at;
/* @var integer */
public ?int $valid_for;
public ?int $period;
/* @var integer */
public ?int $counter;

View File

@ -134,7 +134,7 @@ public function getOTP($data) : OtpDto
$OtpDto->generated_at = time();
$OtpDto->otp_type = 'totp';
$OtpDto->password = $this->token->at($OtpDto->generated_at);
$OtpDto->valid_for = $this->token->getParameter('period');
$OtpDto->period = $this->token->getParameter('period');
}
else if ( $this->tokenOtpType() === 'hotp' ) {