Skip to content

Commit 3e2a57c

Browse files
author
ogorkun
committed
MC-32830: Do not store admin and customer tokens in DB
1 parent 26de7ce commit 3e2a57c

File tree

2 files changed

+2
-532
lines changed

2 files changed

+2
-532
lines changed

app/code/Magento/Integration/Model/OpaqueToken/Issuer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public function create(UserContextInterface $userContext, UserTokenParametersInt
4949
$token = $this->tokenFactory->create();
5050

5151
if ($userContext->getUserType() === UserContextInterface::USER_TYPE_CUSTOMER) {
52-
$token->setAdminId($userContext->getUserId());
52+
$token->setCustomerId($userContext->getUserId());
5353
} elseif ($userContext->getUserType() === UserContextInterface::USER_TYPE_ADMIN) {
54-
$token = $token->createAdminToken($userContext->getUserId());
54+
$token->setAdminId($userContext->getUserId());
5555
} else {
5656
throw new UserTokenException('Can only create tokens for customers and admin users');
5757
}

0 commit comments

Comments
 (0)