Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (TokenModelFactory $tokenModelFactory, UserModel $userModel, TokenCollectionFactory $tokenModelCollectionFactory, CredentialsValidator $validatorHelper) | |
createAdminAccessToken ($username, $password) | |
revokeAdminAccessToken ($adminId) | |
Class to handle token generation for Admins
Definition at line 21 of file AdminTokenService.php.
__construct | ( | TokenModelFactory | $tokenModelFactory, |
UserModel | $userModel, | ||
TokenCollectionFactory | $tokenModelCollectionFactory, | ||
CredentialsValidator | $validatorHelper | ||
) |
Initialize service
TokenModelFactory | $tokenModelFactory | |
UserModel | $userModel | |
TokenCollectionFactory | $tokenModelCollectionFactory | |
\Magento\Integration\Model\CredentialsValidator | $validatorHelper |
Definition at line 62 of file AdminTokenService.php.
createAdminAccessToken | ( | $username, | |
$password | |||
) |
{Create access token for admin given the admin credentials.
string | $username | |
string | $password |
Implements AdminTokenServiceInterface.
Definition at line 77 of file AdminTokenService.php.
revokeAdminAccessToken | ( | $adminId | ) |
Revoke token by admin id.
The function will delete the token from the oauth_token table.
int | $adminId |
Implements AdminTokenServiceInterface.
Definition at line 109 of file AdminTokenService.php.