/**
  * @param ServerResponse $response
  * @return ServerResponse
  */
 public function makeFromValidateResponse(ServerResponse $response)
 {
     $valid = strpos(strtolower($response->getData()), 'yes') !== false;
     if ($valid) {
         $response->markValid();
     } else {
         $response->markInvalid();
     }
     return $response;
 }
 /**
  * @param ServerResponse $response
  * @param AbstractRequest $request
  * @return ServerResponse
  */
 public function handle(ServerResponse $response, AbstractRequest $request)
 {
     $data = $this->parseXML($response->getData());
     if (isset($data['serviceResponse']['authenticationSuccess'])) {
         $response->markValid();
         $response->setData($data['serviceResponse']['authenticationSuccess']);
     } else {
         $response->markInvalid();
     }
     return $response;
 }