Пример #1
0
 /**
  * @return SignRequest
  */
 public function getMatchingRequest(SignResponse $response)
 {
     foreach ($this->requests as $request) {
         if ($request->getKeyHandle() === $response->getKeyHandle() && $request->getChallenge() === $response->getChallenge()) {
             return $request;
         }
     }
     throw new SignRequestException('No matching request found.', IException::ERR_NO_MATCHING_REQUEST);
 }
Пример #2
0
 /**
  * @return Registration
  */
 public function getMatchingRegistration(SignResponse $response)
 {
     foreach ($this->registrations as $registration) {
         if ($registration->getKeyHandle() === $response->getKeyHandle()) {
             return $registration;
         }
     }
     throw new RegistrationException('No matching Registration found.', IException::ERR_NO_MATCHING_REGISTRATION);
 }