public async Task UpdateSettingsAsync(GCCollabAuthenticationSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }
            var container = await _siteService.LoadSiteSettingsAsync();

            container.Alter <GCCollabAuthenticationSettings>(nameof(GCCollabAuthenticationSettings), aspect =>
            {
                aspect.ClientID     = settings.ClientID;
                aspect.ClientSecret = settings.ClientSecret;
                aspect.CallbackPath = settings.CallbackPath;
            });
            await _siteService.UpdateSiteSettingsAsync(container);
        }
        public IEnumerable <ValidationResult> ValidateSettings(GCCollabAuthenticationSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            if (string.IsNullOrWhiteSpace(settings.ClientID))
            {
                yield return(new ValidationResult(S["ClientID is required"], new string[] { nameof(settings.ClientID) }));
            }

            if (string.IsNullOrWhiteSpace(settings.ClientSecret))
            {
                yield return(new ValidationResult(S["ClientSecret is required"], new string[] { nameof(settings.ClientSecret) }));
            }
        }