Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/magento/module-adobe-ims/Controller/Adminhtml/User/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/vendor/magento/module-adobe-ims/Controller/Adminhtml/User/Logout.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Magento\AdobeIms\Controller\Adminhtml\User;

use Magento\AdobeImsApi\Api\LogOutInterface;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Framework\App\Action\HttpPostActionInterface;
use Magento\Framework\Controller\Result\Json;
use Magento\Framework\Controller\ResultFactory;

/**
 * Logout action from the Adobe account
 */
class Logout extends Action implements HttpPostActionInterface
{
    private const HTTP_INTERNAL_SUCCESS = 200;
    private const HTTP_INTERNAL_ERROR = 500;

    /**
     * @see _isAllowed()
     */
    public const ADMIN_RESOURCE = 'Magento_AdobeIms::logout';

    /**
     * @var LogOutInterface
     */
    private $logout;

    /**
     * @param Context $context
     * @param LogOutInterface $logOut
     */
    public function __construct(
        Context $context,
        LogOutInterface $logOut
    ) {
        parent::__construct($context);
        $this->logout = $logOut;
    }

    /**
     * @inheritdoc
     */
    public function execute()
    {
        if ($this->logout->execute()) {
            $responseCode = self::HTTP_INTERNAL_SUCCESS;
            $response = [
                'success' => true,
            ];
        } else {
            $responseCode = self::HTTP_INTERNAL_ERROR;
            $response = [
                'success' => false,
            ];
        }
        /** @var Json $resultJson */
        $resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
        $resultJson->setHttpResponseCode($responseCode);
        $resultJson->setData($response);

        return $resultJson;
    }
}

Spamworldpro Mini