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));
    }