function TestAuthGlobal::applies

Same name in other branches
  1. 9 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuthGlobal.php \Drupal\rest_test\Authentication\Provider\TestAuthGlobal::applies()
  2. 10 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuthGlobal.php \Drupal\rest_test\Authentication\Provider\TestAuthGlobal::applies()
  3. 11.x core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuthGlobal.php \Drupal\rest_test\Authentication\Provider\TestAuthGlobal::applies()

Overrides AuthenticationProviderInterface::applies

File

core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuthGlobal.php, line 16

Class

TestAuthGlobal
Global authentication provider for testing purposes.

Namespace

Drupal\rest_test\Authentication\Provider

Code

public function applies(Request $request) {
    return $request->headers
        ->has('REST-test-auth-global');
}

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