This method creates a Claim Checker Manager and populate it with the claim checkers found based on the alias.
If the alias is not supported, an InvalidArgumentException is thrown.

@param string[] $aliases
326460
public function create(array $aliases): ClaimCheckerManager
    {
        $checkers = [];
        foreach ($aliases as $alias) {
            if (\array_key_exists($alias, $this->checkers)) {
                $checkers[] = $this->checkers[$alias];
            } else {
                throw new \InvalidArgumentException(\sprintf('The claim checker with the alias "%s" is not supported.', $alias));
            }
        }

        return ClaimCheckerManager::create($checkers);
    }
577548
public function issue(array $customClaims = [])
    {
        // ensure there is a user logged in.
        if (!$this->user) {
            return false;
        }

        // try to issue a new token and return.
        try {
            return $this->manager()->issue($this->user, $customClaims);
        } catch (\Exception $e) {
            // catch any exceptions that the token issuing may trigger.
            return false;
        }
    }
1027585
public static function getInstance( array $aliases = [] )
	{
		if( is_null( static::$instance )) {
			return static::$instance = new static( $aliases );
		}

		$aliases = array_merge( static::$instance->aliases, $aliases );

		static::$instance->aliases = $aliases;

		return static::$instance;
	}
378694
private function setupLaravelConfigFile($providers, $aliases)
    {
        if ($this->installConfigFile() == -1) {
            return -1;
        }

        $this->addProviders($providers);

        $this->addAliases($aliases);
    }
1254277
public function setRoles(array $roles)
    {
        $this->roleIdentifiers = [];
        $this->roles = [];
        foreach ($roles as $role) {
            if (!$role instanceof Role) {
                throw new \InvalidArgumentException(sprintf('setRoles() only accepts an array of %s instances, given: "%s"', Role::class, gettype($role)), 1397125997);
            }
            $this->addRole($role);
        }
    }
1260204
public static function getInstance(array $aliases = []) : Manager
    {
        if (is_null(static::$instance)) {
            return static::$instance = new static($aliases);
        }

        static::$instance->alias($aliases);

        return static::$instance;
    }
1150184
public function setLoaders(array $loaders)
    {
        $this->loaders = array();
        foreach ($loaders as $type=>$loader) {
            if (!$loader instanceof ResourceLoaderInterface) {
                throw new \InvalidArgumentException("Not a valid resource loader.");
            }
            $this->loaders[$type] = $loader;
        }
    }
676464
protected function validate($usage, array $usages)
    {
        if (!in_array($usage, $usages)) {
            throw new InvalidArgumentException(
                '['.$usage.'] is not a valid cache usage. Available: '.implode(', ', array_keys($this->usages))
            );
        }

        return $usage;
    }
260080
protected function setMappings(array $mappings = array())
    {
        foreach ($mappings as $mapping) {
            if (!$mapping instanceof ImsManifestMapping) {
                $msg = "The mappings argument must be an array composed of ImsManifestMapping objects";
                throw new InvalidArgumentException($msg);
            }
        }

        $this->mappings = $mappings;
    }
116790
private function checkMandatoryClaims(array $mandatoryClaims, array $claims)
    {
        if (empty($mandatoryClaims)) {
            return;
        }
        $diff = \array_keys(\array_diff_key(\array_flip($mandatoryClaims), $claims));

        if (!empty($diff)) {
            throw new MissingMandatoryClaimException(\sprintf('The following claims are mandatory: %s.', \implode(', ', $diff)), $diff);
        }
    }
813090
protected function addAliases($aliases)
    {
        if ($aliases == null) {
            return;
        }
        foreach ($aliases as $alias => $aliasClass) {
            $this->output->writeln('<info>Adding '.$aliasClass.' to Laravel config app.php file</info>');
            $this->addAlias("'$alias' => ".$aliasClass);
        }
    }
553171
public function setup(array $extracters)
    {
        foreach ($extracters as $extracter) {
            if (
                (false === ($extracter['reference'] instanceof TrackingParameterQueryExtracterInterface))
                && (false === ($extracter['reference'] instanceof TrackingParameterCookieExtracterInterface))
                && (false === ($extracter['reference'] instanceof TrackingParameterInitializerInterface))
            ) {
                throw new InvalidConfigurationException(sprintf(
                    'Invalid tracking parameter extracter "%s".',
                    $extracter['name']
                ));
            }

            $this->extracters[$extracter['name']] = $extracter['reference'];
        }
    }
627301
public void setAliases(java.util.Collection<AliasConfiguration> aliases) {
        if (aliases == null) {
            this.aliases = null;
            return;
        }

        this.aliases = new com.amazonaws.internal.SdkInternalList<AliasConfiguration>(aliases);
    }
52829
public function setAliases(array $aliases)
    {
        foreach ($aliases as $name => $alias) {
            if (!($module = $this->getModule($name))) {
                $module = $this->addModule($name);
            }

            $module->setAlias($alias);
        }

        return $this;
    }
1230549
public void setAliases(java.util.Collection<String> aliases) {
        if (aliases == null) {
            this.aliases = null;
            return;
        }

        this.aliases = new java.util.ArrayList<String>(aliases);
    }
639483
public function setManipulators(array $manipulators)
    {
        foreach ($manipulators as $manipulator) {
            if (!($manipulator instanceof ManipulatorInterface)) {
                throw new InvalidArgumentException('Not a valid manipulator.');
            }
        }

        $this->manipulators = $manipulators;
    }
1223632
public function setNamespaceAliases(array $namespace_aliases)
    {
        $this->namespace_aliases = array();
        foreach ($namespace_aliases as $alias => $fqnn) {
            $this->setNamespaceAlias($alias, $fqnn);
        }
        return $this;
    }