function RestResourceConfig::getAuthenticationProvidersForMethodGranularity

Same name in other branches
  1. 9 core/modules/rest/src/Entity/RestResourceConfig.php \Drupal\rest\Entity\RestResourceConfig::getAuthenticationProvidersForMethodGranularity()
  2. 8.9.x core/modules/rest/src/Entity/RestResourceConfig.php \Drupal\rest\Entity\RestResourceConfig::getAuthenticationProvidersForMethodGranularity()
  3. 10 core/modules/rest/src/Entity/RestResourceConfig.php \Drupal\rest\Entity\RestResourceConfig::getAuthenticationProvidersForMethodGranularity()

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.

1 call to RestResourceConfig::getAuthenticationProvidersForMethodGranularity()
RestResourceConfig::getAuthenticationProviders in core/modules/rest/src/Entity/RestResourceConfig.php

File

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

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 [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.