We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcb125e commit 7d44a28Copy full SHA for 7d44a28
src/OTP/TOTP.php
@@ -36,6 +36,32 @@ protected function getDefaultCounter()
36
return time();
37
}
38
39
+ /**
40
+ * Gets current Time Step value
41
+ *
42
+ * @return int
43
+ */
44
+ public function getTimeStep()
45
+ {
46
+ return $this->timeStep;
47
+ }
48
+
49
50
+ * Sets Time Step value
51
52
+ * @param int $step
53
54
+ * @throws Exception
55
56
+ public function setTimeStep($step)
57
58
+ if (! is_int($step) || ! $step > 0) {
59
+ throw new Exception('Invalid time step');
60
61
62
+ return $this->timeStep = $step;
63
64
65
/**
66
* Apply on counter before generation password
67
*
0 commit comments