You are here

public function SimpleOauthAuthenticationProvider::applies in Simple OAuth (OAuth2) & OpenID Connect 8.2

Same name and namespace in other branches
  1. 8.4 src/Authentication/Provider/SimpleOauthAuthenticationProvider.php \Drupal\simple_oauth\Authentication\Provider\SimpleOauthAuthenticationProvider::applies()
  2. 8 src/Authentication/Provider/SimpleOauthAuthenticationProvider.php \Drupal\simple_oauth\Authentication\Provider\SimpleOauthAuthenticationProvider::applies()
  3. 8.3 src/Authentication/Provider/SimpleOauthAuthenticationProvider.php \Drupal\simple_oauth\Authentication\Provider\SimpleOauthAuthenticationProvider::applies()
  4. 5.x src/Authentication/Provider/SimpleOauthAuthenticationProvider.php \Drupal\simple_oauth\Authentication\Provider\SimpleOauthAuthenticationProvider::applies()

Checks whether suitable authentication credentials are on the request.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request object.

Return value

bool TRUE if authentication credentials suitable for this provider are on the request, FALSE otherwise.

Overrides AuthenticationProviderInterface::applies

File

src/Authentication/Provider/SimpleOauthAuthenticationProvider.php, line 42

Class

SimpleOauthAuthenticationProvider
@internal

Namespace

Drupal\simple_oauth\Authentication\Provider

Code

public function applies(Request $request) {

  // Check for the presence of the token.
  return $this
    ->hasTokenValue($request);
}