Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (TokenModelFactory $tokenModelFactory, AccountManagementInterface $accountManagement, TokenCollectionFactory $tokenModelCollectionFactory, CredentialsValidator $validatorHelper) | |
createCustomerAccessToken ($username, $password) | |
revokeCustomerAccessToken ($customerId) | |
Definition at line 18 of file CustomerTokenService.php.
__construct | ( | TokenModelFactory | $tokenModelFactory, |
AccountManagementInterface | $accountManagement, | ||
TokenCollectionFactory | $tokenModelCollectionFactory, | ||
CredentialsValidator | $validatorHelper | ||
) |
Initialize service
TokenModelFactory | $tokenModelFactory | |
AccountManagementInterface | $accountManagement | |
TokenCollectionFactory | $tokenModelCollectionFactory | |
\Magento\Integration\Model\CredentialsValidator | $validatorHelper |
Definition at line 59 of file CustomerTokenService.php.
createCustomerAccessToken | ( | $username, | |
$password | |||
) |
{Create access token for admin given the customer credentials.
string | $username | |
string | $password |
Implements CustomerTokenServiceInterface.
Definition at line 74 of file CustomerTokenService.php.
revokeCustomerAccessToken | ( | $customerId | ) |
Revoke token by customer id.
The function will delete the token from the oauth_token table.
int | $customerId |
Implements CustomerTokenServiceInterface.
Definition at line 102 of file CustomerTokenService.php.