/** * @param string $identifier Permanent and unique identifier of this user within your application. This * identifier will be used authenticate the user as well as pair devices additional devices to the user's account * within your white label group. * @return WhiteLabelUser * @throws CommunicationError If there was an error communicating with the endpoint * @throws InvalidCredentialsError If the credentials supplied to the endpoint were invalid * @throws InvalidRequestError If the endpoint proclaims the request invalid * @throws InvalidResponseError If the encrypted data is not valid JSON */ public function createUser($identifier) { $this->debugLog("Initiating white label user create request", array("identifier" => $identifier)); $user = $this->apiService->createWhiteLabelUser($identifier); $this->debugLog("White label user created", array("user" => $user)); $this->eventDispatcher->dispatchEvent(WhiteLabelUserCreatedEvent::NAME, new WhiteLabelUserCreatedEvent($user)); return $user; }
/** * @param AuthResponse $authResponse */ private function processAuthResponse(AuthResponse $authResponse) { $this->eventDispatcher->dispatchEvent(AuthResponseEvent::NAME, new AuthResponseEvent($authResponse)); if ($authResponse->isAuthorized()) { if ($this->logger) { $this->logger->debug("Logging Authenticate true"); } $this->apiService->log($authResponse->getAuthRequestId(), "Authenticate", true); } }