Skip to content

Commit 3c27a5a

Browse files
RachanaRachana
authored andcommitted
BUG#AC-9337:Revoking or invalidating previous access tokens upon generating new access token for Restapi
1 parent 76d2b7a commit 3c27a5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/Magento/JwtUserToken/Model/RevokedValidator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@ public function validate(UserToken $token): void
4343
if ($revoked && $token->getData()->getIssued()->getTimestamp() <= $revoked->getBeforeTimestamp()) {
4444
throw new AuthorizationException(__('User token has been revoked'));
4545
}
46+
elseif($revoked && $token->getData()->getIssued()->getTimestamp() >= $revoked->getBeforeTimestamp()) {
47+
throw new AuthorizationException(__('User token has been revoked'));
48+
}
4649
}
4750
}

0 commit comments

Comments
 (0)