/** * @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); }
/** * @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); }