Get the service account name for the application.

@throws AppIdentityException If there is an error using the AppIdentity
service.

@return string The service account name.
352349
public static function getServiceAccountName() {
    $req = new GetServiceAccountNameRequest();
    $resp = new GetServiceAccountNameResponse();

    try {
      ApiProxy::makeSyncCall(self::PACKAGE_NAME, 'GetServiceAccountName', $req,
          $resp);
    } catch (ApplicationError $e) {
      throw self::applicationErrorToException($e);
    }

    return $resp->getServiceAccountName();
  }
1221599
public AppIdentity getAppIdentity() {
		if (isCached(defaultApiConfig.getApplication()))
			return applicationIdentityCache.get(defaultApiConfig.getApplication()).getAppIdentity();
		else
			return getAppIdentity(defaultApiConfig);
 	}
70287
public function getName()
    {
        if (empty($this->name)) {
            $this->name = strstr((new \ReflectionClass(get_class($this)))->getShortName(), 'Provider', true);
        }

        return $this->name;
    }
103869
public function getNamespace()
    {
        if(!is_null($this->appNamespace)) {
            return $this->appNamespace;
        }

        $composer = json_decode(file_get_contents(base_path().'/composer.json'));

        foreach($composer->autoload->{"psr-4"} as $namespace => $path) {
            if(realpath(app_path()) === realpath(base_path(). '/' .$path))  {
                return $this->appNamespace = $namespace;
            }
        }

        throw new Exception("Namespace detect problem.");
    }
598021
public function getIdentifier() : ?string 
    {
        if ( ! $this->hasIdentifier()) {
            $this->setIdentifier($this->getDefaultIdentifier());
        }
        return $this->identifier;
    }
713635
protected function getUsername()
    {

        // initialize the name
        $name = null;

        // query whether or not we've an principal
        if ($identity = $this->getIdentity()) {
            $name = $identity->getName();
        }

        // return the name
        return $name;
    }
681790
public function getIdentity()
    {
        $controller = $this->getController();
        $identity = $controller->request->getAttribute($this->getConfig('identityAttribute'));

        return $identity;
    }
554340
public function getAppNames()
    {
        $apps = [];
        if ($projectRoot = $this->getWelcomeCommand()->getProjectRoot()) {
            foreach (LocalApplication::getApplications($projectRoot) as $app) {
                $name = $app->getName();
                if ($name !== null) {
                    $apps[] = $name;
                }
            }
        } elseif ($project = $this->getProject()) {
            if ($environment = $this->api->getEnvironment('master', $project, false)) {
                $apps = array_keys($environment->getSshUrls());
            }
        }

        return $apps;
    }
300537
public Identity getIdentity()
    {
        if(identity == null)
        {
            identity = tx.getBroker().serviceIdentity().buildIdentity(obj);
        }
        return identity;
    }
164444
public function getIdentityString() {
		if (!is_array($this->throwableArray)) {
			$renderer = new \n2n\log4php\renderer\RendererException();
			
			$this->throwableArray = explode("\n", $renderer->render($this->throwable));
		}
		
		return $this->throwableArray;
	}
968578
public function appNameSpace()
    {
        $app_dir = $this->appDir();
        $root_dir = $this->rootDir();
        $ns_path = substr($app_dir, strlen($root_dir) + 1);
        return str_replace(DS, '\\', $ns_path);
    }
764777
public function getName()
	{
		$name = $this->_name;

		if (empty($name))
		{
			$r = null;

			if (!preg_match('/J(.*)/i', get_class($this), $r))
			{
				JLog::add(JText::_('JLIB_APPLICATION_ERROR_APPLICATION_GET_NAME'), JLog::WARNING, 'jerror');
			}

			$name = strtolower($r[1]);
		}

		return $name;
	}
314408
protected function getAppNamespace()
    {
        $composer = json_decode(file_get_contents(base_path().'/composer.json'), true);

        foreach ((array) data_get($composer, 'autoload.psr-4') as $namespace => $path) {
            foreach ((array) $path as $pathChoice) {
                if (realpath(app_path()) == realpath(base_path().'/'.$pathChoice)) {
                    return $namespace;
                }
            }
        }

        throw new \RuntimeException('Unable to detect application namespace.');
    }
986167
public function getName()
    {
        if (!isset($this->name)) {
            OsDetector::detect($this, $this->getUserAgent());
        }

        return $this->name;
    }
1194399
protected function getReplyServiceName()
    {
        return $this->nameSpace.
            self::NAME_SPACE_SEPARATOR.
            $this->getCurrentServiceName().
            self::NAME_SPACE_SEPARATOR.
            self::QUEUE_REPLY_SUFFIX.
            self::QUEUE_SUFFIX;
    }
901632
public String getName() {
        if (name == null && securityIdentity != null) {
            name = securityIdentity.getPrincipal().getName();
        }

        return name;
    }
538045
public synchronized Name getServiceName() {
        if (size() < 2) {
            return null;
        }
        if (cachedServiceName == null) {
            cachedServiceName = getCompositeKey().getPrefix(size() - 1);
        }
        return cachedServiceName;
    }