yield [$request, 'Invalid credentials.', BadCredentialsException::
class];
$request =
new Request([],
[],
[],
[],
[],
['HTTP_AUTHORIZATION' => 'BearerVALID_ACCESS_TOKEN'
]);
yield [$request, 'Invalid credentials.', BadCredentialsException::
class];
$request =
new Request([],
[],
[],
[],
[],
['HTTP_AUTHORIZATION' => 'Bearer INVALID_ACCESS_TOKEN'
]);
yield [$request, 'Invalid access token or invalid user.', BadCredentialsException::
class];
} private function setUpAuthenticator(string
$headerParameter = 'Authorization', string
$tokenType = 'Bearer'
): void
{ $this->authenticator =
new AccessTokenAuthenticator( $this->accessTokenHandler,
new HeaderAccessTokenExtractor($headerParameter,
$tokenType),
$this->userProvider
);
}}