function TestAuth::applies

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

Overrides AuthenticationProviderInterface::applies

File

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

Class

TestAuth
Authentication provider for testing purposes.

Namespace

Drupal\rest_test\Authentication\Provider

Code

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

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