private function requireAuthentication(Request $request): Administrator
    {
        $administrator = $this->authentication->authenticateByApiKey($request);
        if ($administrator === null) {
            throw new AccessDeniedHttpException(
                'No valid session key was provided as basic auth password.',
                null,
                1512749701
            );
        }

        return $administrator;
    }
private function requireAuthentication(Request $request): Administrator
    {
        $administrator = $this->authentication->authenticateByApiKey($request);
        if ($administrator === null) {
            throw new AccessDeniedHttpException(
                'No valid session key was provided as basic auth password.',
                null,
                1512749701
            );
        }

        return $administrator;
    }
private function requireAuthentication ( Request $ request ) : Administrator { $ administrator = $ this -> authentication -> authenticateByApiKey ( $ request ) ; if ( $ administrator === null ) { throw new AccessDeniedHttpException ( 'No valid session key was provided as basic auth password.' , null , 1512749701 ) ; } return $ administrator ; }
Checks for valid authentication in the given request and throws an exception if there is none.

@param Request $request

@return Administrator the authenticated administrator

@throws AccessDeniedHttpException
Checks for valid authentication in the given request and throws an exception if there is none .