mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-1146: Take configured "totp-period" into account when generating tokens.
This commit is contained in:
@@ -271,7 +271,8 @@ public class UserVerificationService {
|
|||||||
|
|
||||||
// Get generator based on user's key and provided configuration
|
// Get generator based on user's key and provided configuration
|
||||||
TOTPGenerator totp = new TOTPGenerator(key.getSecret(),
|
TOTPGenerator totp = new TOTPGenerator(key.getSecret(),
|
||||||
confService.getMode(), confService.getDigits());
|
confService.getMode(), confService.getDigits(),
|
||||||
|
TOTPGenerator.DEFAULT_START_TIME, confService.getPeriod());
|
||||||
|
|
||||||
// Verify provided TOTP against value produced by generator
|
// Verify provided TOTP against value produced by generator
|
||||||
if ((code.equals(totp.generate()) || code.equals(totp.previous()))
|
if ((code.equals(totp.generate()) || code.equals(totp.previous()))
|
||||||
|
Reference in New Issue
Block a user