class TestAuth

Same name and namespace in other branches
  1. 9 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth
  2. 10 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth
  3. 11.x core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth

Authentication provider for testing purposes.

Hierarchy

Expanded class hierarchy of TestAuth

1 string reference to 'TestAuth'
rest_test.services.yml in core/modules/rest/tests/modules/rest_test/rest_test.services.yml
core/modules/rest/tests/modules/rest_test/rest_test.services.yml
1 service uses TestAuth
rest_test.authentication.test_auth in core/modules/rest/tests/modules/rest_test/rest_test.services.yml
Drupal\rest_test\Authentication\Provider\TestAuth

File

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

Namespace

Drupal\rest_test\Authentication\Provider
View source
class TestAuth implements AuthenticationProviderInterface {
    
    /**
     * {@inheritdoc}
     */
    public function applies(Request $request) {
        return $request->headers
            ->has('REST-test-auth');
    }
    
    /**
     * {@inheritdoc}
     */
    public function authenticate(Request $request) {
        return NULL;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
TestAuth::applies public function Checks whether suitable authentication credentials are on the request. Overrides AuthenticationProviderInterface::applies
TestAuth::authenticate public function Authenticates the user. Overrides AuthenticationProviderInterface::authenticate

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