-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from ihorvansach/refactor-code-microservices
Refactor LoginAsCustomer Login Model
- Loading branch information
Showing
21 changed files
with
617 additions
and
303 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
app/code/Magento/LoginAsCustomer/Api/AuthenticateCustomerInterface.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,23 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\LoginAsCustomer\Api; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface AuthenticateCustomerInterface | ||
{ | ||
/** | ||
* Authenticate a customer by customer ID | ||
* | ||
* @return bool | ||
* @param int $customerId | ||
* @param int $adminId | ||
*/ | ||
public function execute(int $customerId, int $adminId):bool; | ||
} |
22 changes: 22 additions & 0 deletions
22
app/code/Magento/LoginAsCustomer/Api/CreateSecretInterface.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,22 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\LoginAsCustomer\Api; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface CreateSecretInterface | ||
{ | ||
/** | ||
* Create a new secret key | ||
* @return string | ||
* @param int $customerId | ||
* @param int $adminId | ||
*/ | ||
public function execute(int $customerId, int $adminId):string; | ||
} |
19 changes: 19 additions & 0 deletions
19
app/code/Magento/LoginAsCustomer/Api/DeleteOldSecretsInterface.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,19 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\LoginAsCustomer\Api; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface DeleteOldSecretsInterface | ||
{ | ||
/** | ||
* Delete old secret key records | ||
*/ | ||
public function execute():void; | ||
} |
19 changes: 19 additions & 0 deletions
19
app/code/Magento/LoginAsCustomer/Api/DeleteSecretInterface.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,19 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\LoginAsCustomer\Api; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface DeleteSecretInterface | ||
{ | ||
/** | ||
* Delete secret key | ||
*/ | ||
public function execute(string $secretKey):void; | ||
} |
19 changes: 19 additions & 0 deletions
19
app/code/Magento/LoginAsCustomer/Api/GetAuthenticateDataInterface.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,19 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\LoginAsCustomer\Api; | ||
|
||
/** | ||
* @api | ||
*/ | ||
interface GetAuthenticateDataInterface | ||
{ | ||
/** | ||
* Load login details based on secret key | ||
*/ | ||
public function execute(string $secretKey):array; | ||
} |
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
Oops, something went wrong.