You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Authentification and Authorization plugins (Cakephp 4.1). I followed your instructions here and here.
I have a problem with the function getAuthorizationService in Application class :
Fatal error: Declaration of App\Application::getAuthorizationService(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response) must be compatible with Authorization\AuthorizationServiceProviderInterface::getAuthorizationService(Psr\Http\Message\ServerRequestInterface $request): Authorization\AuthorizationServiceInterface
public function getAuthorizationService(ServerRequestInterface $request, ResponseInterface $response) {
$map = [
ServerRequest::class => new RequestPolicy(),
];
$resolver = new MapResolver($map);
return new AuthorizationService($resolver);
}
Can you help me please ?
The text was updated successfully, but these errors were encountered:
public function getAuthorizationService(ServerRequestInterface $request): AuthorizationServiceInterface
{
$map = [
ServerRequest::class => new RequestPolicy(),
];
$resolver = new MapResolver($map);
return new AuthorizationService($resolver);
}
Hi,
I am using Authentification and Authorization plugins (Cakephp 4.1). I followed your instructions here and here.
I have a problem with the function getAuthorizationService in Application class :
Can you help me please ?
The text was updated successfully, but these errors were encountered: