You are here

public function ServiceResource::getAuthentication in Services 9.0.x

Same name and namespace in other branches
  1. 8.4 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');
}