-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stubbing twofactor class implementation
- Loading branch information
Showing
6 changed files
with
121 additions
and
21 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
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?php | ||
|
||
namespace AwesIO\Auth\Tests\Stubs; | ||
|
||
use AwesIO\Auth\Services\Contracts\TwoFactor as TwoFactorInterface; | ||
|
||
class TwoFactor implements TwoFactorInterface | ||
{ | ||
/** | ||
* Http client | ||
* | ||
* @var \GuzzleHttp\Client | ||
*/ | ||
protected $client; | ||
|
||
public function __construct() | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Register user on Authy | ||
* | ||
* @param \App\User $user | ||
* @return boolean|object | ||
*/ | ||
public function register($user) | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* Verify if 2FA token is valid | ||
* | ||
* @param \App\User $user | ||
* @param string $token | ||
* @return boolean | ||
*/ | ||
public function verifyToken($user, $token) | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* Remove user from Authy | ||
* | ||
* @param \App\User $user | ||
* @return boolean | ||
*/ | ||
public function remove($user) | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* Request QR code link. | ||
* | ||
* @param string $authy_id User's id stored in your database | ||
* @param array $opts Array of options, for example: array("qr_size" => 300) | ||
* | ||
* @return mixed | ||
*/ | ||
public function qrCode($user) | ||
{ | ||
return json_decode([]); | ||
} | ||
} |
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