Is client public

@param   integer  $client_id
@return  boolean
437138
public function isPublicClient($client_id)
	{
		// get client details
		$client = $this->getClientDetails($client_id);

		// make sure its an available client (aka not deleted)
		return $client && $client['state'] != 2 ? true : false;
	}
795687
public function getClientActiveProjects($client_id)
    {
        $result = $this->getClientProjects( $client_id );
        if ( $result->isSuccess() ) {
            $projects = array();
            foreach ($result->data as $project) {
                if ($project->active == "true") {
                    $projects[$project->id] = $project;
                }
            }
            $result->data = $projects;
        }

        return $result;
    }
433795
public static function getApplication($base, $client_id = self::ADMIN)
    {
        $_SERVER['SERVER_PORT'] = 80;

        if (!self::$_application)
        {
            self::bootstrap($base);

            $options = array(
                'root_user' => 'root',
                'client_id' => $client_id
            );

            self::$_application = new Application($options);

            $credentials = array(
                'name'      => 'root',
                'username'  => 'root',
                'groups'    => array(8),
                'email'     => 'root@localhost.home'
            );

            self::$_application->authenticate($credentials);

            // If there are no marks in JProfiler debug plugin performs a division by zero using count($marks)
            \JProfiler::getInstance('Application')->mark('Hello world');
        }

        return self::$_application;
    }
1142281
public function getClientDetails($client_id)
    {
        $result = $this->client->getItem(array(
            "TableName"=> $this->config['client_table'],
            "Key" => array('client_id'   => array('S' => $client_id))
        ));
        if ($result->count()==0) {
            return false ;
        }
        $result = $this->dynamo2array($result);
        foreach (array('client_id', 'client_secret', 'redirect_uri', 'grant_types', 'scope', 'user_id') as $key => $val) {
            if (!array_key_exists ($val, $result)) {
                $result[$val] = null;
            }
        }

        return $result;
    }
1012069
public function client($id)
    {
        if (isset($this->clients[$id])) {
            return $this->clients[$id];
        }

        return new Client($this, $id);
    }
245562
def oauth_client_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/oauth/clients/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1374867
public function removeClientUser($client_id, $user_id)
    {
        $sql    = 'DELETE from %s where client_id = :client_id and user_id = :user_id';
        $sql    = sprintf($sql, $this->config['client_user_table']);
        $params = array_map('trim', compact('client_id', 'user_id'));

        return $this->db->prepare($sql)->execute($params);
    }
528696
public function stat_client($client_mac)
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/stat/user/' . strtolower(trim($client_mac)));

        return $this->process_response($response);
    }
540614
public function getClientKey($client_id, $subject)
    {
        $result = $this->client->getItem(array(
            "TableName"=> $this->config['jwt_table'],
            "Key" => array('client_id'   => array('S' => $client_id), 'subject' => array('S' => $subject))
        ));
        if ($result->count()==0) {
            return false ;
        }
        $token = $this->dynamo2array($result);

        return $token['public_key'];
    }
1237076
public function deleteApiApp($client_id)
    {

        $response = $this->rest->delete(
            static::APIAPP_PATH . '/' . $client_id
        );

        $this->checkResponse($response, false);

        return true;
    }
315924
public function getClientId($binding_index)
    {
        $binding = $this->getBinding();
        return array_key_exists('clientId', $binding[$binding_index]) ? $binding[$binding_index]['clientId'] : null;
    }
233812
public function client()
	{
		if (isset($this->client)) {
			return $this->client ? $this->client : null;
		}
		
		$client_id = $this->clientId();
		if (!$client_id) {
			$this->client = false;
			return null;
		}
		
		$client = $this->fetchClient($client_id);
		if ($client) {
			$this->client = $client;
		}
		else {
			$this->client = false;
		}
		
		return $this->client ? $this->client : null;
	}
1361959
public function isPublicClient($clientId)
    {
        $client = $this->getClientDataMapper()->findByUuid($clientId);

        if (! $client instanceof Entity\Client) {
            return false;
        }

        return $client->isPublic();
    }
756880
function is_site_delegated_connection( $blog_id = 0 ) {
            if ( ! $this->_is_network_active ) {
                return false;
            }

            if ( 0 == $blog_id ) {
                $blog_id = get_current_blog_id();
            }

            return $this->_storage->get( 'is_delegated_connection', false, $blog_id );
        }
217358
public function getClientDetails($client_id)
    {
        $result = $this->getObjectByType('client_table',$client_id);

        return is_null($result) ? false : $result;
    }
389887
public function checkClientCredentials($client_id, $client_secret = null)
    {
        $result = $this->client->getItem(array(
            "TableName"=> $this->config['client_table'],
            "Key" => array('client_id'   => array('S' => $client_id))
        ));

        return  $result->count()==1 && $result["Item"]["client_secret"]["S"] == $client_secret;
    }
1307007
public function getTemplate($client_id = 0, $id = 0)
	{
		if (!$this->app->has('cache.store') || !($cache = $this->app['cache.store']))
		{
			$cache = new \Hubzero\Cache\Storage\None(array('hash' => $this->app->hash('template.loader')));
		}

		$templates = $cache->get('com_templates.templates' . $client_id . $this->lang);

		if (!$templates || empty($templates))
		{
			try
			{
				$db = $this->app['db'];

				$s = '#__template_styles';
				$e = '#__extensions';

				$query = new Query($db);
				$query
					->select($s . '.id')
					->select($s . '.home')
					->select($s . '.template')
					->select($s . '.params')
					->select($e . '.protected')
					->from($s)
					->join($e, $e . '.element', $s . '.template')
					->whereEquals($s . '.client_id', (int)$client_id)
					->whereEquals($e . '.enabled', 1)
					->whereEquals($e . '.type', 'template')
					->whereRaw($e . '.`client_id` = `' . $s . '`.`client_id`');

				if ($id)
				{
					$query->whereEquals($s . '.id', $id);
				}

				$query->order('home', 'desc');

				$db->setQuery($query->toString());
				$templates = $db->loadObjectList('id');

				foreach ($templates as $i => $template)
				{
					$template->params = new Registry($template->params);

					if (substr($template->template, 0, 4) == 'tpl_')
					{
						$template->template = substr($template->template, 4);
					}

					if (is_dir($this->getPath('app') . DIRECTORY_SEPARATOR . $template->template))
					{
						$template->path = $this->getPath('app') . DIRECTORY_SEPARATOR . $template->template;
					}
					else
					{
						$template->path = $this->getPath('core') . DIRECTORY_SEPARATOR . $template->template;
					}

					$templates[$i] = $template;

					// Create home element
					if ($template->home && !isset($templates[0]))
					{
						$templates[0] = clone $template;
					}
				}

				$cache->put('com_templates.templates' . $client_id . $this->lang, $templates, $this->app['config']->get('cachetime', 15));
			}
			catch (Exception $e)
			{
				$templates = array();
			}
		}

		$tmpl = null;

		if (isset($templates[$id]))
		{
			$tmpl = $templates[$id];
		}
		else if (isset($templates[0]))
		{
			$tmpl = $templates[0];
		}

		if ($tmpl && file_exists($tmpl->path . DIRECTORY_SEPARATOR . 'index.php'))
		{
			return $tmpl;
		}

		return $this->getSystemTemplate();
	}