Пример #1
0
 /**
  * Automatically generated method, will be overridden
  *
  * @param Request $request      	
  * @return Response
  */
 public function run(Request $request)
 {
     $json = Json::decode($request->getContent());
     $path = new JSONPath($json);
     $login = $path->find('$.data.attributes.login')->first();
     $password = $path->find('$.data.attributes.password')->first();
     $domain = new SessionDomain($this->getServiceContainer());
     $payload = $domain->login($login, $password);
     return $this->responder->run($request, $payload);
 }
Пример #2
0
 /**
  * Automatically generated method, will be overridden
  *
  * @param Request $request
  * @return Response
  */
 public function run(Request $request)
 {
     $domain = new SessionDomain($this->getServiceContainer());
     $payload = $domain->logout();
     return $this->responder->run($request, $payload);
 }