You are here

public function ServiceResource::getAuthentication in Services 8.4

Same name and namespace in other branches
  1. 9.0.x src/Entity/ServiceResource.php \Drupal\services\Entity\ServiceResource::getAuthentication()

Get resource allowed authentication.

Return value

array An array of allowed authentication.

Overrides ServiceResourceInterface::getAuthentication

1 call to ServiceResource::getAuthentication()
ServiceResource::calculateDependencies in src/Entity/ServiceResource.php
Calculates dependencies and stores them in the dependency property.

File

src/Entity/ServiceResource.php, line 115

Class

ServiceResource
Defines service resource entity.

Namespace

Drupal\services\Entity

Code

public function getAuthentication() {
  if (!empty($this->authentication)) {
    return array_filter($this->authentication);
  }
  return $this
    ->getDefaultSettings()
    ->get('default_authentication');
}