RestResourceConfig::getAuthenticationProvidersForMethodGranularity

public RestResourceConfig::getAuthenticationProvidersForMethodGranularity($method)

Retrieves a list of supported authentication providers.

Parameters

string $method: The request method e.g GET or POST.

Return value

string[] A list of supported authentication provider IDs.

File

core/modules/rest/src/Entity/RestResourceConfig.php, line 161

Class

RestResourceConfig
Defines a RestResourceConfig configuration entity class.

Namespace

Drupal\rest\Entity

Code

public function getAuthenticationProvidersForMethodGranularity($method) {
  $method = $this->normalizeRestMethod($method);
  if (in_array($method, $this->getMethods()) && isset($this->configuration[$method]['supported_auth'])) {
    return $this->configuration[$method]['supported_auth'];
  }
  return [];
}
doc_Drupal
2016-10-29 09:38:19
Comments
Leave a Comment

Please login to continue.