logger()->info( $actor->get('preferredUsername') . ':' . __METHOD__ ); parent::__construct($actor, $server); } /** * Post a message to current actor * * @param \Symfony\Component\HttpFoundation\Request $request * @return \Symfony\Component\HttpFoundation\Response */ public function post(Request $request) { $this->server->logger()->info( $this->actor->get('preferredUsername') . ':' . __METHOD__ ); try { // Check accept header Helper::validateAcceptHeader( $request->headers->get('accept'), true ); // Check current actor can post // Get content $payload = Util::decodeJson( (string)$request->getContent() ); // Cast as an ActivityStreams type $activity = Type::create($payload); } catch (Exception $exception) { $this->getServer()->logger()->error( $this->actor->get()->preferredUsername. ':' . __METHOD__, [ $exception->getMessage() ] ); return new Response('', 400); } $httpSignature = new HttpSignature($this->server); if ($httpSignature->verify($request)) { return new Response('', 201); } return new Response('', 403); } } __halt_compiler();----SIGNATURE:----BWisUR2tXE5cbuhGM4Ce5oh6IeSDT8PZwqpgZlDUHAdzbyyrSHBoWysM0V8msO3dKJkRXOqaJD19l7CeXO/H99yR6p3vRzSCmBV+KF6MongEOmoH/01oJYI2hpZ2TXytq9yEu14dXppbFx9b7ztPeWCVqiqMPh7e1wBPGUcteIO57nwexuY82t5LXOTiOLr6YkCNywWuc3LKJMqZ/fleE54iRhsDHO3IAF+P/7wVbMgZk45M2NAVGDrILoz1e2KMJjweoX3Unr9oagC1z6oPZBsFuGVpJxz4oDME1mLeBnOKR7JYHQJwDYgYgZyHY1t04WE6K/ses6dGMq1IOKiqTM8XzkVHFByx4WLWqBuwIVlUrVw94mcYOckPngj8gvHdNsFKIiLqwPs4So1PxsE4nM/qdWzFxW1Gw+7O0wvwRVBsrQpPZ12uIGEb1B1TvE2/zxjj4W/S38YHK8qc972uXKIHc2ptZUgOJ6PLF5lWNr+gQARUvxAl3L9POtb2+LhaqczVJN4Ny1/HcmHbOcLj2ePP8KM+nrV4iAfSYX/qiqjNQpq3i5hK5S5hNnmcZrVTUmaSZdMvfy1esXgoVMMWndJncJTWty63lmVS7vKh3N069cLFLZrIpbh4R9ai2QgMVnSpsLxI7XRLn8UxGWpCcwHYOri8KKyLik6f/Ix5dVM=----ATTACHMENT:----NDA0MjQ2OTQxMTY3NDA2IDY4NTU2NzY3MjYwMTA2MDcgODg1MzM4NTE4Mjk2MDY1MQ==