You are here

public function Authentication::applies in RESTful 7.2

Determines if the request can be checked for authentication. For example, when authenticating with HTTP header, return FALSE if the header values do not exist.

Parameters

RequestInterface $request: The request.

Return value

bool TRUE if the request can be checked for authentication, FALSE otherwise.

Overrides AuthenticationInterface::applies

3 methods override Authentication::applies()
BasicAuthentication::applies in src/Plugin/authentication/BasicAuthentication.php
Determines if the request can be checked for authentication. For example, when authenticating with HTTP header, return FALSE if the header values do not exist.
OAuth2ServerAuthentication::applies in src/Plugin/authentication/OAuth2ServerAuthentication.php
Determines if the request can be checked for authentication. For example, when authenticating with HTTP header, return FALSE if the header values do not exist.
TokenAuthentication::applies in modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php
Determines if the request can be checked for authentication. For example, when authenticating with HTTP header, return FALSE if the header values do not exist.

File

src/Plugin/authentication/Authentication.php, line 34
Contains \Drupal\restful\Plugin\authentication\Authentication

Class

Authentication

Namespace

Drupal\restful\Plugin\authentication

Code

public function applies(RequestInterface $request) {

  // By default assume that the request can be checked for authentication.
  return TRUE;
}