Exemple #1
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;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 protected function getAllowedServicesMetadata($requestedServices)
 {
     $allowedServicesMetadata = parent::getAllowedServicesMetadata($requestedServices);
     if (!$allowedServicesMetadata) {
         throw new AuthorizationException(__(AuthorizationException::NOT_AUTHORIZED, ['resources' => implode(', ', $requestedServices)]));
     }
     return $allowedServicesMetadata;
 }