Example #1
0
 /**
  * Initialize dependencies.
  *
  * @param \Magento\Framework\App\Cache\Type\Webapi $cache
  * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  * @param \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator
  * @param \Magento\Webapi\Model\ServiceMetadata $serviceMetadata
  * @param WsdlFactory $wsdlFactory
  */
 public function __construct(\Magento\Framework\App\Cache\Type\Webapi $cache, \Magento\Framework\Reflection\TypeProcessor $typeProcessor, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator, \Magento\Webapi\Model\ServiceMetadata $serviceMetadata, WsdlFactory $wsdlFactory)
 {
     $this->_wsdlFactory = $wsdlFactory;
     parent::__construct($cache, $typeProcessor, $storeManager, $customAttributeTypeLocator, $serviceMetadata);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 protected function getAllowedServicesMetadata($requestedServices)
 {
     $allowedServicesMetadata = parent::getAllowedServicesMetadata($requestedServices);
     if (!$allowedServicesMetadata) {
         throw new AuthorizationException(__('Consumer is not authorized to access %resources', ['resources' => implode(', ', $requestedServices)]));
     }
     return $allowedServicesMetadata;
 }
Example #3
0
 /**
  * Initialize dependencies.
  *
  * @param \Magento\Webapi\Model\Cache\Type\Webapi $cache
  * @param \Magento\Framework\Reflection\TypeProcessor $typeProcessor
  * @param \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator
  * @param \Magento\Webapi\Model\ServiceMetadata $serviceMetadata
  * @param Authorization $authorization
  * @param SwaggerFactory $swaggerFactory
  * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata
  */
 public function __construct(\Magento\Webapi\Model\Cache\Type\Webapi $cache, \Magento\Framework\Reflection\TypeProcessor $typeProcessor, \Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface $customAttributeTypeLocator, \Magento\Webapi\Model\ServiceMetadata $serviceMetadata, Authorization $authorization, SwaggerFactory $swaggerFactory, ProductMetadataInterface $productMetadata)
 {
     $this->swaggerFactory = $swaggerFactory;
     $this->productMetadata = $productMetadata;
     parent::__construct($cache, $typeProcessor, $customAttributeTypeLocator, $serviceMetadata, $authorization);
 }
Example #4
0
 /**
  * {@inheritdoc}
  */
 protected function getAllowedServicesMetadata($requestedServices)
 {
     $allowedServicesMetadata = parent::getAllowedServicesMetadata($requestedServices);
     if (!$allowedServicesMetadata) {
         throw new AuthorizationException(__(AuthorizationException::NOT_AUTHORIZED, ['resources' => implode(', ', $requestedServices)]));
     }
     return $allowedServicesMetadata;
 }