/** * Check that the request comes with a valid token. * * @param Request $request The request. * * @return bool True if there is a valid token in the request. False otherwise. */ public function checkAuthorization(Request $request) { $token = Token::getTokenFromRequest($request); return Token::existToken($token); }