Beispiel #1
0
 private function identUnknownIdentity()
 {
     if (!empty($this->previousIdKey) && $this->store->checkIdentityKey($this->previousIdKey) !== SqrlStoreInterface::IDENTITY_UNKNOWN) {
         if (empty($this->clientSUK) || empty($this->clientVUK)) {
             $this->tif |= self::CLIENT_FAILURE | self::COMMAND_FAILED;
         } else {
             $this->store->updateIdentityKey($this->previousIdKey, $this->authenticationKey, $this->clientSUK, $this->clientVUK);
             $this->store->logSessionIn($this->requestNut);
             $this->tif |= self::ID_MATCH | self::PREVIOUS_ID_MATCH;
         }
         return;
     }
     if (!$this->config->getAnonAllowed()) {
         //notify the client that anonymous authentication is not allowed in this transaction
         $this->tif |= self::FUNCTION_NOT_SUPPORTED | self::COMMAND_FAILED;
     } elseif (empty($this->clientSUK)) {
         $this->tif |= self::CLIENT_FAILURE | self::COMMAND_FAILED;
     } else {
         $this->store->createIdentity($this->authenticationKey, $this->clientSUK, $this->clientVUK);
         $this->store->logSessionIn($this->requestNut);
         $this->tif |= self::ID_MATCH;
     }
 }