Get the login key.

@return string
171524
protected function getUniqueLoginKey()
    {
        $key = $this->request->input($this->loginKey);
        $ip = $this->request->ip();

        return \mb_strtolower($key).$ip;
    }
1114939
public function key()
    {
        // TODO: Track position internally to avoid repeated info() calls
        if ( ! $this->useIdentifierKeys) {
            $info = $this->riakCursor->info();

            return isset($info['at']) ? $info['at'] : null;
        }

        return $this->riakCursor->key();
    }
913706
protected function submitKey(): string
  {
    return ($this->obfuscator) ? $this->obfuscator->encode(Cast::toOptInt($this->name)) : $this->name;
  }
314603
public function getUploadKey()
    {
        if ( ! empty($this->uploadKey)) {
            return $this->uploadKey;
        }

        $key = $this->getRequest()->header('Upload-Key') ?? Uuid::uuid4()->toString();

        if (empty($key)) {
            return $this->response->send(null, HttpResponse::HTTP_BAD_REQUEST);
        }

        $this->uploadKey = $key;

        return $this->uploadKey;
    }
949769
protected function getUserId()
    {
        if (property_exists($this, 'userKey'))
        {
            $userKey = $this->userKey;

            return $this->$userKey;
        }

        if ( ! is_null($this->user_id))
        {
            return $this->user_id;
        }

        return null;
    }
65550
public function getKey(): string
    {
        if ($this->key) {
            return $this->key;
        }

        // If the user has set a custom key.
        if ($this->config->has('key')) {
            $key = Key::validate($this->config->get('key'), 'field');

            $this->key = $key;

            return $key;
        }

        // For fields which doesn't require name attribute use label instead.
        if (
            !$this->config->has('name') &&
            in_array($this->getType(), ['accordion', 'message', 'tab'])
        ) {
            $key = $this->config->get('label');
        } else {
            $key = $this->config->get('name');
        }

        $key = sprintf('%s_%s', $this->parentKey, Key::sanitize($key));

        $this->key = $key;

        return $key;
    }
805229
public function key()
    {
        $key = key($this->data);
        return isset($this->keys[$key]) ? $this->keys[$key] : $key;
    }
586933
public function getKey(): string
    {
        if ($this->key) {
            return $this->key;
        }

        if ($this->config->has('key')) {
            $key = Key::validate($this->config->get('key'), 'group');

            $this->key = $key;

            return $key;
        }

        $this->key = Key::sanitize($this->config->get('title'));

        return $this->key;
    }
643795
public function getKey(): string
    {
        if (null === $this->name) {
            return $this->type;
        }

        return $this->type . '#' . $this->name;
    }
1124637
public function getCacheKey()
    {
        if (is_null($this->cacheKey)) {
            return $this->cachePrefix . $this->getUserName();
        }

        return $this->cacheKey;
    }
329977
protected function getRequestKey()
    {
        if (! $this->_requestKey) {
            $request = $this->getRequest();

            $this->_requestKey[$request->getModuleKey()]     = $request->getModuleName();
            $this->_requestKey[$request->getControllerKey()] = $request->getControllerName();
            $this->_requestKey[$request->getActionKey()]     = $this->sourceAction ? $this->sourceAction : $request->getActionName();
        }

        return $this->_requestKey;
    }
173713
protected function getAuthForLogin()
	{
		// If a "key" was specified in the auth credentials, we will load it into a
		// secure RSA key instance, which will be used to connect to the servers
		// in place of a password, and avoids the developer specifying a pass.
		if ($this->hasRsaKey())
		{
			return $this->loadRsaKey($this->auth);
		}

		// If a plain password was set on the auth credentials, we will just return
		// that as it can be used to connect to the server. This will be used if
		// there is no RSA key and it gets specified in the credential arrays.
		elseif (isset($this->auth['password']))
		{
			return $this->auth['password'];
		}

		throw new \InvalidArgumentException('Password / key is required.');
	}
1219114
public function key()
    {
        // TODO: Track position internally to avoid repeated info() calls
        if ( ! $this->useIdentifierKeys) {
            $info = $this->mongoCursor->info();

            return isset($info['at']) ? $info['at'] : null;
        }

        return $this->mongoCursor->key();
    }
738146
private function getAppKey(): string
    {
        $appUUID = $this
            ->getRepositoryReference()
            ->getAppUUID();

        return $appUUID instanceof AppUUID
            ? $appUUID->getId()
            : '';
    }
965612
public function getKey()
    {
        $attributes = [];

        foreach ($this->getKeyName() as $key) {
            $attributes[$key] = $this->getAttribute($key);
        }

        return $attributes;
    }
3395
public static function get_autologin_key() {
        global $USER;
        // Delete previous keys.
        delete_user_key('tool_mobile', $USER->id);

        // Create a new key.
        $iprestriction = getremoteaddr();
        $validuntil = time() + self::LOGIN_KEY_TTL;
        return create_user_key('tool_mobile', $USER->id, null, $iprestriction, $validuntil);
    }
892170
public function loginApplication()
    {
        $request = [
            'auth' => [
                $this->applicationKey,
                $this->applicationSecret,
            ],
            'headers' => [
                'Content-Type'  => 'application/json',
                'Accept'        => 'application/json',
            ],
            'json'  => [
                'application_bundle' => '',
            ],
        ];

        $url = $this->getRequestUrl().'/auth/login/application';

        $response = $this->getHttpClient()->post($url, $request);
        $response = json_decode($response->getBody());

        $this->connectionToken = $response->connection->token;

        return $this->connectionToken;
    }