Is there is a built in REST API for sign out
in Magento because I looked in the reference and couldn't find?
Magento 2 – How to Sign Out Using REST API
apiintegrationmagento2rest
apiintegrationmagento2rest
Is there is a built in REST API for sign out
in Magento because I looked in the reference and couldn't find?
Best Answer
Currently, my Magento version is 2.1.5, I cannot find the API for the "sign out" function. However, seem that Magento builds the revoked token by customer id method already.
vendor/magento/module-integration/Api/CustomerTokenServiceInterface.php
vendor/magento/module-integration/Model/CustomerTokenService.php::revokeCustomerAccessToken()
[NOT TEST MY CODE]
app/code/Vendor/Integration/etc/webapi.xml
app/code/Vendor/Integration/etc/di.xml
app/code/Vendor/Integration/Api/CustomerRevokeTokenServiceInterface.php
app/code/Vendor/Integration/Model/CustomerRevokeTokenService.php
Remember to create
registration.php
andmodule.xml
files.We can use the revoke customer access token:
/V1/integration/customer/revoke