Configure the Telescope authorization services.

@return void
979523
protected function authorization()
    {
        $this->gate();

        Telescope::auth(function ($request) {
            return app()->environment('local') ||
                   Gate::check('viewTelescope', [$request->user()]);
        });
    }
534506
protected function configureAliases()
    {
        $this->aliases = array_merge($this->aliases, $this->config('bono.aliases') ?: array());

        foreach ($this->aliases as $key => $value) {
            if (! class_exists($key)) {
                class_alias($value, $key);
            }
        }
    }
636171
public function authorize()
    {
        $response = $this->send(self::API_TOKEN_URL, false, array_only($this->config, [
            'client_id', 'client_secret', 'redirect_uri', 'username', 'password', 'grant_type'
        ]), 'POST');

        if ($token = array_get($response, 'access_token')) {
            $this->setAccessToken($token);
        }

        return $this;
    }
688203
protected void doConfigure() {
        if (config != null) {
            for (UserBean user : config.getUsersToCreate()) {
                setUser(user.getEmail(), user.getLogin(), user.getPassword());
            }
            getManagers().getUserManager().setAuthRequired(!config.isAuthenticationDisabled());
        }
    }
1289584
protected function configure()
    {
        $this->packages['invoice'] = 'Concordat\Invoice\InvoiceConsole';
        $this->packages['payment'] = 'Concordat\Payment\PaymentConsole';
        $this->packages['pricing'] = 'Concordat\Pricing\PricingConsole';
        $this->packages['profiling'] = 'Concordat\Profiling\ProfilingConsole';
        $this->packages['publisher'] = 'Concordat\Publisher\PublisherConsole';

        $this->paths['default'] = sprintf('app/database/%s/', $this->type);
        $this->paths['laravel'] = sprintf('database/%s/', $this->type);

        $default = class_exists('Illuminate\Foundation\Application') ? 'laravel' : 'default';

        $this->addArgument('name', InputArgument::REQUIRED, 'Name of the Concordat package.');
        $this->addOption('path', null, $this->optional, 'Path for the files to be created.');
        $this->addOption('type', null, $this->optional, 'Type of template to be used.', $default);
    }
360532
protected function configure()
    {
        $this->bind(ResourceInterface::class)->to(Resource::class)->in(Scope::SINGLETON);
        $this->bind(InvokerInterface::class)->to(Invoker::class);
        $this->bind(LinkerInterface::class)->to(Linker::class);
        $this->bind(FactoryInterface::class)->to(Factory::class);
        $this->bind(SchemeCollectionInterface::class)->toProvider(SchemeCollectionProvider::class);
        $this->bind(AnchorInterface::class)->to(Anchor::class);
        $this->bind(NamedParameterInterface::class)->to(NamedParameter::class);
        $this->bind(RenderInterface::class)->to(PrettyJsonRenderer::class)->in(Scope::SINGLETON);
        $this->bind(Cache::class)->to(ArrayCache::class);
        $this->bind(RenderInterface::class)->annotatedWith('options')->to(OptionsRenderer::class);
        $this->bind(OptionsMethods::class);
        $this->bind(NamedParamMetasInterface::class)->to(NamedParamMetas::class);
    }
788226
protected function registerAuthorizationServer()
    {
        $this->app->singleton(AuthorizationServer::class, function () {
            return tap($this->makeAuthorizationServer(), function ($server) {
                $server->setDefaultScope(Passport::$defaultScope);

                $server->enableGrantType(
                    $this->makeAuthCodeGrant(), Passport::tokensExpireIn()
                );

                $server->enableGrantType(
                    $this->makeRefreshTokenGrant(), Passport::tokensExpireIn()
                );

                $server->enableGrantType(
                    $this->makePasswordGrant(), Passport::tokensExpireIn()
                );

                $server->enableGrantType(
                    new PersonalAccessGrant, Passport::personalAccessTokensExpireIn()
                );

                $server->enableGrantType(
                    new ClientCredentialsGrant, Passport::tokensExpireIn()
                );

                if (Passport::$implicitGrantEnabled) {
                    $server->enableGrantType(
                        $this->makeImplicitGrant(), Passport::tokensExpireIn()
                    );
                }
            });
        });
    }
1050513
private function authorise()
	{
		$url = $this->getOption('authoriseURL') . '?oauth_token=' . $this->token['key'];

		if ($this->getOption('scope'))
		{
			$scope = \is_array($this->getOption('scope')) ? implode(' ', $this->getOption('scope')) : $this->getOption('scope');
			$url .= '&scope=' . urlencode($scope);
		}

		if ($this->getOption('sendheaders'))
		{
			$this->application->redirect($url);
		}
	}
1285545
public function authorise()
    {
        $this->getLogger()->info('Setting Authorise for display ID ' . $this->displayId);
        $this->doPut('/display/authorise/' . $this->displayId);
    }
476320
public function authorize()
    {
        $this->assertServiceInstance();

        try {
            $request = $this->di->get('request');
            $code = $request->getQuery('code', null);
            if (!is_null($code)) {
                $state = $request->getQuery('state', null);

                return $this->service->requestAccessToken($code, $state);
            }
        } catch (\OAuth\Common\Exception\Exception $ex) {
            throw new FailedAuthorizationException($ex->getMessage());
        }
    }
801923
private function configureEnabledRectorsOnly(): void
    {
        $this->visitors = [];
        $enabledRectors = $this->enabledRectorsProvider->getEnabledRectors();

        foreach ($enabledRectors as $enabledRector => $configuration) {
            foreach ($this->allPhpRectors as $phpRector) {
                if (! is_a($phpRector, $enabledRector, true)) {
                    continue;
                }

                $this->addRectorConfiguration($configuration, $phpRector);

                $this->addVisitor($phpRector);
                continue 2;
            }
        }
    }
1017555
protected function addAssignmentsToSu() : void
    {
        $roleSu = $this->authManager->getRole(Rbac::R_SU);
        $this->addRolesToSU($roleSu);
        $this->addPermissionsToSU($roleSu);
    }
171035
protected function configure()
    {
        $this->addArgument(
            'command-to-run',
            InputArgument::REQUIRED,
            'Command to run'
        );
        $this->addOption(
            'log',
            null,
            Option::VALUE_REQUIRED,
            'Log to file'
        );
        $this->addOption(
            'stage',
            null,
            Option::VALUE_REQUIRED,
            'Stage to deploy'
        );
        $this->addOption(
            'roles',
            null,
            Option::VALUE_REQUIRED,
            'Roles to deploy'
        );
        $this->addOption(
            'hosts',
            null,
            Option::VALUE_REQUIRED,
            'Host to deploy, comma separated, supports ranges [:]'
        );
    }
70743
protected function configure(): void
    {
        // eg. IndexConfigure() for indexCommand()
        $method = $this->action . 'Configure';

        if (\method_exists($this, $method)) {
            $this->$method();
        }
    }
949264
protected function registerAuthorizationService()
    {
        $overrulingPriority = $this->getHighestAuthenticationServicePriority() + 1;

        ExtensionManagementUtility::addService(
            'solr', // extension key
            'auth', // service type
            AuthorizationService::class,
            // service key
            [// service meta data
                'title' => 'Solr Indexer Authorization',
                'description' => 'Authorizes the Solr Index Queue indexer to access protected pages.',

                'subtype' => 'getUserFE,authUserFE,getGroupsFE',

                'available' => true,
                'priority' => $overrulingPriority,
                'quality' => 100,

                'os' => '',
                'exec' => '',

                'classFile' => ExtensionManagementUtility::extPath('solr') . 'Classes/IndexQueue/FrontendHelper/AuthorizationService.php',
                'className' => AuthorizationService::class,
            ]
        );
    }
1230490
protected function configure()
    {
        $this
            ->setName($this->getName())
            ->setDescription($this->getDescription())
            ->addOption(
                'storage',
                null,
                InputOption::VALUE_OPTIONAL,
                'Environment Location Storage',
                $this->getDefaultFileName()
            );
    }
347254
protected function controlAccessAdmin()
    {
        if ($this->is_backend && !$this->isSuperadmin()) {

            if (empty($this->current_user['role_status']) || !$this->access('admin')) {
                $this->redirect('/', $this->text('No access'), 'warning');
            }

            if (isset($this->current_route['access']) && !$this->access($this->current_route['access'])) {
                $this->setHttpStatus(403);
            }
        }
    }