concrete/authentication/external_concrete5/controller.php
public function saveAuthenticationType($args)
    {
        $passedUrl = trim($args['url']);

        if ($passedUrl) {
            try {
                $url = Url::createFromUrl($passedUrl);

                if (!(string)$url->getScheme() || !(string)$url->getHost()) {
                    throw new InvalidArgumentException('No scheme or host provided.');
                }

            } catch (\Exception $e) {
                throw new InvalidArgumentException('Invalid URL.');
            }
        }

        $passedName = trim($args['displayName']);
        if (!$passedName) {
            throw new InvalidArgumentException('Invalid display name');
        }
        $this->authenticationType->setAuthenticationTypeName($passedName);

        $config = $this->app->make(Repository::class);
        $config->save('auth.external_concrete5.url', $args['url']);
        $config->save('auth.external_concrete5.appid', $args['apikey']);
        $config->save('auth.external_concrete5.secret', $args['apisecret']);
        $config->save('auth.external_concrete5.registration.enabled', (bool) $args['registration_enabled']);
        $config->save('auth.external_concrete5.registration.group', intval($args['registration_group'], 10));
    }
public function saveAuthenticationType($args)
    {
        $passedUrl = trim($args['url']);

        if ($passedUrl) {
            try {
                $url = Url::createFromUrl($passedUrl);

                if (!(string)$url->getScheme() || !(string)$url->getHost()) {
                    throw new InvalidArgumentException('No scheme or host provided.');
                }

            } catch (\Exception $e) {
                throw new InvalidArgumentException('Invalid URL.');
            }
        }

        $passedName = trim($args['displayName']);
        if (!$passedName) {
            throw new InvalidArgumentException('Invalid display name');
        }
        $this->authenticationType->setAuthenticationTypeName($passedName);

        $config = $this->app->make(Repository::class);
        $config->save('auth.external_concrete5.url', $args['url']);
        $config->save('auth.external_concrete5.appid', $args['apikey']);
        $config->save('auth.external_concrete5.secret', $args['apisecret']);
        $config->save('auth.external_concrete5.registration.enabled', (bool) $args['registration_enabled']);
        $config->save('auth.external_concrete5.registration.group', intval($args['registration_group'], 10));
    }
public function saveAuthenticationType ( $ args ) { $ passedUrl = trim ( $ args [ 'url' ] ) ; if ( $ passedUrl ) { try { $ url = Url :: createFromUrl ( $ passedUrl ) ; if ( ! ( string ) $ url -> getScheme ( ) || ! ( string ) $ url -> getHost ( ) ) { throw new InvalidArgumentException ( 'No scheme or host provided.' ) ; } } catch ( \ Exception $ e ) { throw new InvalidArgumentException ( 'Invalid URL.' ) ; } } $ passedName = trim ( $ args [ 'displayName' ] ) ; if ( ! $ passedName ) { throw new InvalidArgumentException ( 'Invalid display name' ) ; } $ this -> authenticationType -> setAuthenticationTypeName ( $ passedName ) ; $ config = $ this -> app -> make ( Repository :: class ) ; $ config -> save ( 'auth.external_concrete5.url' , $ args [ 'url' ] ) ; $ config -> save ( 'auth.external_concrete5.appid' , $ args [ 'apikey' ] ) ; $ config -> save ( 'auth.external_concrete5.secret' , $ args [ 'apisecret' ] ) ; $ config -> save ( 'auth.external_concrete5.registration.enabled' , ( bool ) $ args [ 'registration_enabled' ] ) ; $ config -> save ( 'auth.external_concrete5.registration.group' , intval ( $ args [ 'registration_group' ] , 10 ) ) ; }
Save data for this authentication type
This method is called when the type_form.php submits. It stores client details and configuration for connecting

@param array|\Traversable $args
Save data for this authentication type This method is called when the type_form . php submits . It stores client details and configuration for connecting