This repository has been archived by the owner on Mar 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
1,111 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
|
2 changes: 1 addition & 1 deletion
2
src/Eloquent/Otis/Hotp/Configuration/HotpBasedConfigurationInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
|
2 changes: 1 addition & 1 deletion
2
src/Eloquent/Otis/Hotp/Configuration/HotpConfigurationInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
|
2 changes: 1 addition & 1 deletion
2
src/Eloquent/Otis/Hotp/Validator/Parameters/HotpParametersInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/Eloquent/Otis/Motp/Configuration/MotpConfiguration.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
* | ||
* Copyright © 2013 Erin Millard | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Eloquent\Otis\Motp\Configuration; | ||
|
||
/** | ||
* Represents a complete set of mOTP configuration settings. | ||
*/ | ||
class MotpConfiguration implements MotpConfigurationInterface | ||
{ | ||
/** | ||
* Construct a new mOTP configuration. | ||
* | ||
* @param integer|null $futureWindows The number of future windows to check. | ||
* @param integer|null $pastWindows The number of past windows to check. | ||
*/ | ||
public function __construct($futureWindows = null, $pastWindows = null) | ||
{ | ||
if (null === $futureWindows) { | ||
$futureWindows = 3; | ||
} | ||
if (null === $pastWindows) { | ||
$pastWindows = 3; | ||
} | ||
|
||
$this->futureWindows = $futureWindows; | ||
$this->pastWindows = $pastWindows; | ||
} | ||
|
||
/** | ||
* Get the number of future windows to check. | ||
* | ||
* @return integer The number of future windows to check. | ||
*/ | ||
public function futureWindows() | ||
{ | ||
return $this->futureWindows; | ||
} | ||
|
||
/** | ||
* Get the number of past windows to check. | ||
* | ||
* @return integer The number of past windows to check. | ||
*/ | ||
public function pastWindows() | ||
{ | ||
return $this->pastWindows; | ||
} | ||
|
||
private $futureWindows; | ||
private $pastWindows; | ||
} |
34 changes: 34 additions & 0 deletions
34
src/Eloquent/Otis/Motp/Configuration/MotpConfigurationInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php // @codeCoverageIgnoreStart | ||
|
||
/* | ||
* This file is part of the Otis package. | ||
* | ||
* Copyright © 2013 Erin Millard | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Eloquent\Otis\Motp\Configuration; | ||
|
||
use Eloquent\Otis\Configuration\MfaConfigurationInterface; | ||
|
||
/** | ||
* The interface implemented by mOTP configurations. | ||
*/ | ||
interface MotpConfigurationInterface extends MfaConfigurationInterface | ||
{ | ||
/** | ||
* Get the number of future windows to check. | ||
* | ||
* @return integer The number of future windows to check. | ||
*/ | ||
public function futureWindows(); | ||
|
||
/** | ||
* Get the number of past windows to check. | ||
* | ||
* @return integer The number of past windows to check. | ||
*/ | ||
public function pastWindows(); | ||
} |
Oops, something went wrong.