Get auth factory

If no auth factory has been set, this method will
set and return a default auth factory, if any such
value is available

@see getDefaultAuthFactory()

@return Factory|null auth factory or null if none auth factory has been set
505205
public function getAuthFactory(): ?Factory
    {
        if (!$this->hasAuthFactory()) {
            $this->setAuthFactory($this->getDefaultAuthFactory());
        }
        return $this->authFactory;
    }
1234041
protected function client()
    {
        $apiKey = $this->config('apiKey');
        if (!$apiKey) {
            return null;
        }

        $endpoint = $this->config('endpoint');
        $defaults = $this->config('defaults');
        if ($defaults === null) {
            $defaults = true;
        }
        $client = Client::make($apiKey, $endpoint, $defaults);

        return $client;
    }
82370
public function getAuthUser()
    {
        $user = null;
        if ($this->api_auth()->check()) {
            $user = $this->api_auth()->user();
        } else if (\Auth::check()) {
            $user = \Auth::user();
        }
        return $user;
    }
349692
public function constructAuthorize()
    {
        if (empty($this->_config['authorize'])) {
            return null;
        }
        $this->_authorizeObjects = [];
        $authorize = Hash::normalize((array)$this->_config['authorize']);
        $global = [];
        if (isset($authorize[AuthComponent::ALL])) {
            $global = $authorize[AuthComponent::ALL];
            unset($authorize[AuthComponent::ALL]);
        }
        foreach ($authorize as $alias => $config) {
            if (!empty($config['className'])) {
                $class = $config['className'];
                unset($config['className']);
            } else {
                $class = $alias;
            }
            $className = App::className($class, 'Auth', 'Authorize');
            if (!class_exists($className)) {
                throw new Exception(sprintf('Authorization adapter "%s" was not found.', $class));
            }
            if (!method_exists($className, 'authorize')) {
                throw new Exception('Authorization objects must implement an authorize() method.');
            }
            $config = (array)$config + $global;
            $this->_authorizeObjects[$alias] = new $className($this->_registry, $config);
        }

        return $this->_authorizeObjects;
    }
1288813
public function getDefaultOptions()
    {
        if (! $this->defaults) {
            return null;
        }

        if ($this->defaults instanceof ConfigInterface) {
            return $this->defaults->getArrayCopy();
        }

        return (array)$this->defaults;
    }
1217537
public function getDefaultValue()
    {
        $default = $this->_default;

        if ($default && !$this->isScalar()) {
            $default = $default instanceof AnDomainAttributeInterface ? clone $default :
                        AnDomainAttribute::getInstance($this->_type);
        }

        return $default;
    }
238794
public function getDi() {
        if(is_null($this->di)) {
            $this->di = FactoryDefault::getDefault();
            if(is_null($this->di)) {
                $this->di = new FactoryDefault();
            }
        }
        return $this->di;
    }
318038
public function getDefault()
    {
        if ($this->default) {
            return $this->default;
        }
        if (!empty($this->values)) {
            return reset($this->values);
        }
        return null;
    }
96723
public function pathFactory()
    {
        if (null === $this->pathFactory) {
            $this->pathFactory = $this->createDefaultPathFactory();
        }

        return $this->pathFactory;
    }
1223647
public static function getFactory()
    {
        if (self::$nb_provider_factory === null) {
            self::$nb_provider_factory = new CNabuProviderFactory();
            self::$nb_provider_factory->init();
        }

        return self::$nb_provider_factory;
    }
348290
protected function getAuthForLogin()
    {
        if ($this->useAgent()) {
            return $this->getAgent();
        }

        // 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.
        elseif ($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.');
    }
178864
@Override
    public String[] getDefaultCipherSuites() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "getDefaultCipherSuites");
        if (tc.isDebugEnabled())
            Tr.debug(tc, "default_factory: " + default_factory);
        String[] output = null;
        if (default_factory != null) {
            output = default_factory.getDefaultCipherSuites();
        }
        if (tc.isEntryEnabled())
            Tr.exit(tc, "getDefaultCipherSuites", new Object[] { output });
        return output;
    }
948967
public function getAuthManager(): ?AuthManager
    {
        if (!$this->hasAuthManager()) {
            $this->setAuthManager($this->getDefaultAuthManager());
        }
        return $this->authManager;
    }
1059944
protected function getAdapterFactory()
    {
        if (!isset($this->factoryCache[$this->id])) {
            $config = config('jwt');
            if (isset($this->config['adapter'])) {
                $config = array_merge($config, $this->config['adapter']);
            }
            $factoryClass = $this->getAdapterFactoryClass();
            $this->factoryCache[$this->id] = new $factoryClass($config);
        }
        return $this->factoryCache[$this->id];
    }
80473
public function createService(OAuthServiceFactory $factory)
    {
        $config = $this->config->get('auth.external_concrete5');

        $appId = array_get($config, 'appid');
        $appSecret = array_get($config, 'secret');
        $baseUrl = array_get($config, 'url');

        // Get the callback url
        /** @var Url $callbackUrl */
        $callbackUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete5/callback/']);
        if ($callbackUrl->getHost() == '') {
            $callbackUrl = $callbackUrl->setHost($this->request->getHost());
            $callbackUrl = $callbackUrl->setScheme($this->request->getScheme());
        }

        // Create a credential object with our ID, Secret, and callback url
        $credentials = new Credentials($appId, $appSecret, (string) $callbackUrl);

        // Create a new session storage object and pass it the active session
        $storage = new SymfonySession($this->session, false);

        $baseApiUrl = new Uri($baseUrl);

        // Create the service using the oauth service factory
        return $factory->createService('external_concrete5', $credentials, $storage, [
            ExternalConcrete5Service::SCOPE_OPENID,
        ], $baseApiUrl);
    }
848137
public function getAuth($name = null)
    {
        if ($name !== null) {
            return isset($this->authParams[$name]) ? $this->authParams[$name] : null;
        }

        return $this->authParams;
    }
695589
public function getDefault() {
    	if ($this->isPublic() && !$this->isStatic() && $this->refClass->isAbstract() == false) {	    		 
	  		$className = $this->refClass->getName();
	  		// TODO: find a way to get default value for abstract properties.
	  		// TODO: optimize this: we should not have to create one new instance for every property....
	  		/*$instance = new $className();
			$property = $this->getName();
	    	return $instance->$property;*/
	  		
	  		// In some cases, the call to getDefaultProperties can log NOTICES
	  		// in particular if an undefined constant is used as default value.
	  		ob_start();
	  		$defaultProperties = $this->refClass->getDefaultProperties();
	  		$possibleError = ob_get_clean();
			if ($possibleError) {
				throw new \Exception($possibleError);	
			}
	  		return $defaultProperties[$this->getName()];
    	} else {
    		return null;
    	}
    }