You are here

public function JwtAuth::applies in JSON Web Token Authentication (JWT) 8

Same name and namespace in other branches
  1. 8.0 src/Authentication/Provider/JwtAuth.php \Drupal\jwt\Authentication\Provider\JwtAuth::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/JwtAuth.php, line 54

Class

JwtAuth
JWT Authentication Provider.

Namespace

Drupal\jwt\Authentication\Provider

Code

public function applies(Request $request) {
  return (bool) self::getJwtFromRequest($request);
}