private static OAuth2Parameters CreateAuthorizationParameters(string scope) { GoogleIntegrationElement settings = FrameworkConfiguration.Current.WebApplication.Integration.Google; return(new OAuth2Parameters() { ClientId = settings.ClientId, ClientSecret = settings.ClientSecret, Scope = "openid " + scope }); }
protected override void LoadResources() { imgGoogleAppsLogo.ImageUrl = ResourceProvider.GetImageUrl(typeof(GoogleIntegrationControl), "GoogleApps.jpg", true); hlGoogleAppsForBusiness.Text = Resources.GoogleIntegrationControl_GoogleAppsForBusiness_Text; GoogleIntegrationElement settings = FrameworkConfiguration.Current.WebApplication.Integration.Google; hlAddApplication.Text = string.Format(CultureInfo.InvariantCulture, Resources.GoogleIntegrationControl_AddApplication_Text, settings.ApplicationName); hlAddApplication.NavigateUrl = settings.ApplicationListingUrl; litCaption.Text = Resources.GoogleIntegrationControl_Caption_Text; BaseControl.LoadResources(EditForm, typeof(OrganizationLdapSettingsControl).Name); lblGoogleDomain.Text = Resources.GoogleIntegrationControl_EditForm_GoogleDomain_HeaderText; lblGoogleEmail.Text = Resources.GoogleIntegrationControl_EditForm_GoogleEmail_HeaderText; lblGooglePassword.Text = Resources.GoogleIntegrationControl_EditForm_GooglePassword_HeaderText; lblTitle.Text = Resources.GoogleIntegrationControl_EditForm_ObjectName; lblDescription.Text = Resources.GoogleIntegrationControl_Description_Text; lblGoogleSetup.Text = Resources.GoogleIntegrationControl_GoogleSetup_Text; lblStep1.Text = Resources.GoogleIntegrationControl_Step1_Text; lbStep1.Text = Resources.GoogleIntegrationControl_Step1_LinkButton_Text; lbImportUsers.Text = Resources.GoogleIntegrationControl_ImportUsers_LinkButton_Text; upStep1Progress.ProgressText = Resources.GoogleIntegrationControl_UpdateProgress_Text; upStep1Progress.Timeout = int.MaxValue; upStep1Progress.HideAfter = int.MaxValue; upStep1Progress.ShowSuccessText = false; upStep1Progress.PostBackControlId = this.lbStep1.ClientID; lblStep2.Text = Resources.GoogleIntegrationControl_Step2_Text; lbStep2.Text = Resources.GoogleIntegrationControl_Step2_LinkButton_Text; upStep2Progress.ProgressText = Resources.GoogleIntegrationControl_UpdateProgress_Text; upStep2Progress.Timeout = int.MaxValue; upStep2Progress.HideAfter = int.MaxValue; upStep2Progress.ShowSuccessText = false; upStep2Progress.PostBackControlId = this.lbStep2.ClientID; btnSaveToken.Text = Resources.GoogleIntegrationControl_SaveTokenButton_Text; btnChangeToken.Text = Resources.GoogleIntegrationControl_ChangTokenButton_Text; lblTokenDescription.Text = Resources.GoogleIntegrationControl_TokenDescription_Text; btnCancel.Text = Resources.AutoGeneratedButtonsField_CancelButton_Text; lblYourGoogleDomain.Text = Resources.GoogleIntegrationControl_YourGoogleDomain_Text; }