protected void Page_Load(object sender, EventArgs e) { openIdType = base.Request.QueryString["t"]; if (string.IsNullOrEmpty(openIdType) || (openIdType.Trim().Length == 0)) { base.GotoResourceNotFound(); } PluginItem pluginItem = OpenIdPlugins.Instance().GetPluginItem(openIdType); if (pluginItem == null) { base.GotoResourceNotFound(); } if (!Page.IsPostBack) { txtName.Text = pluginItem.DisplayName; lblDisplayName.Text = pluginItem.DisplayName; txtSelectedName.Value = openIdType; OpenIdSettingsInfo openIdSettings = OpenIdHelper.GetOpenIdSettings(openIdType); if (openIdSettings != null) { ConfigData data = new ConfigData(Cryptographer.Decrypt(openIdSettings.Settings)); txtConfigData.Value = data.SettingsXml; txtName.Text = openIdSettings.Name; fcContent.Text = openIdSettings.Description; } } }
public static PluginItemCollection GetEmptyItems() { PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins(); PluginItemCollection result; if (plugins == null || plugins.Count == 0) { result = null; } else { IList <string> configedTypes = OpenIdProvider.Instance().GetConfigedTypes(); if (configedTypes != null && configedTypes.Count > 0) { foreach (string current in configedTypes) { if (plugins.ContainsKey(current.ToLower())) { plugins.Remove(current.ToLower()); } } } result = plugins; } return(result); }
protected void Page_Load(object sender, System.EventArgs e) { if (this.Context.Request.IsAuthenticated) { System.Web.Security.FormsAuthentication.SignOut(); System.Web.HttpCookie authCookie = System.Web.Security.FormsAuthentication.GetAuthCookie(HiContext.Current.User.Username, true); IUserCookie userCookie = HiContext.Current.User.GetUserCookie(); if (userCookie != null) { userCookie.DeleteCookie(authCookie); } RoleHelper.SignOut(HiContext.Current.User.Username); } string text = base.Request.QueryString["ot"]; if (OpenIdPlugins.Instance().GetPluginItem(text) == null) { this.lblMsg.Text = "没有找到对应的插件,<a href=\"" + Globals.GetSiteUrls().Home + "\">返回首页</a>。"; return; } OpenIdSettingsInfo openIdSettings = MemberProcessor.GetOpenIdSettings(text); if (openIdSettings == null) { this.lblMsg.Text = "请先配置此插件所需的信息,<a href=\"" + Globals.GetSiteUrls().Home + "\">返回首页</a>。"; return; } string returnUrl = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl("OpenIdEntry_url", new object[] { text })); OpenIdService openIdService = OpenIdService.CreateInstance(text, HiCryptographer.Decrypt(openIdSettings.Settings), returnUrl); openIdService.Post(); }
public static PluginItemCollection GetConfigedItems() { IList <string> configedTypes = OpenIdProvider.Instance().GetConfigedTypes(); PluginItemCollection result; if (configedTypes == null || configedTypes.Count == 0) { result = null; } else { PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins(); if (plugins != null && plugins.Count > 0) { PluginItem[] items = plugins.Items; PluginItem[] array = items; for (int i = 0; i < array.Length; i++) { PluginItem pluginItem = array[i]; if (!configedTypes.Contains(pluginItem.FullName.ToLower())) { plugins.Remove(pluginItem.FullName.ToLower()); } } } result = plugins; } return(result); }
protected void Page_Load(object sender, EventArgs e) { string text = base.Request.QueryString["ot"]; PluginItem pluginItem = OpenIdPlugins.Instance().GetPluginItem(text); string text2 = "WapShop"; if (string.IsNullOrEmpty(this.Page.Request.RawUrl)) { goto IL_0049; } goto IL_0049; IL_0049: if (pluginItem == null) { this.lblMsg.Text = "没有找到对应的插件,<a href=\"/\">返回首页</a>。"; } else { OpenIdSettingInfo openIdSettings = MemberProcessor.GetOpenIdSettings(text); if (openIdSettings == null) { this.lblMsg.Text = "请先配置此插件所需的信息,<a href=\"/\">返回首页</a>。"; } else { string returnUrl = Globals.FullPath(base.GetRouteUrl("OpenIdEntry_url", new { HIGW = text.Replace(".", "_") })); OpenIdService openIdService = OpenIdService.CreateInstance(text, HiCryptographer.Decrypt(openIdSettings.Settings), returnUrl); openIdService.Post(); } } }
protected void Page_Load(object sender, EventArgs e) { string text = base.Request.QueryString["ot"]; PluginItem pluginItem = OpenIdPlugins.Instance().GetPluginItem(text); if (pluginItem == null) { this.msg = "没有找到对应的插件,<a href=\"/\">返回首页</a>。"; } else { OpenIdSettingInfo openIdSettings = MemberProcessor.GetOpenIdSettings(text); if (openIdSettings == null) { this.msg = "请先配置此插件所需的信息,<a href=\"/\">返回首页</a>。"; } else { string text2 = base.Request.QueryString["returnUrl"]; string text3 = base.Request.QueryString["client"].ToNullString(); if (string.IsNullOrEmpty(text3)) { text3 = "wapshop"; } string returnUrl = Globals.FullPath(base.GetRouteUrl("OpenIdEntry_url_Wap", new { HIGW = text.Replace(".", "_") })).ToLower().Replace("/wapshop/", "/" + text3 + "/"); OpenIdService openIdService = OpenIdService.CreateInstance(text, HiCryptographer.Decrypt(openIdSettings.Settings), returnUrl); openIdService.Post(); } } }
public static PluginItemCollection GetEmptyItems() { PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins(); if ((plugins == null) || (plugins.Count == 0)) { return(null); } IList <string> configedTypes = OpenIdProvider.Instance().GetConfigedTypes(); if ((configedTypes != null) && (configedTypes.Count > 0)) { foreach (string str in configedTypes) { if (plugins.ContainsKey(str.ToLower())) { plugins.Remove(str.ToLower()); } } } return(plugins); }
public static PluginItemCollection GetEmptyItems() { PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins(); if (plugins == null || plugins.Count == 0) { return(null); } IList <string> configedTypes = new OpenIdSettingDao().GetConfigedTypes(); if (configedTypes != null && configedTypes.Count > 0) { foreach (string item in configedTypes) { if (plugins.ContainsKey(item.ToLower())) { plugins.Remove(item.ToLower()); } } } return(plugins); }
public static PluginItemCollection GetConfigedItems() { IList <string> configedTypes = OpenIdProvider.Instance().GetConfigedTypes(); if ((configedTypes == null) || (configedTypes.Count == 0)) { return(null); } PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins(); if ((plugins != null) && (plugins.Count > 0)) { PluginItem[] items = plugins.Items; foreach (PluginItem item in items) { if (!configedTypes.Contains(item.FullName.ToLower())) { plugins.Remove(item.FullName.ToLower()); } } } return(plugins); }
public static PluginItemCollection GetConfigedItems() { IList <string> configedTypes = new OpenIdSettingDao().GetConfigedTypes(); if (configedTypes == null || configedTypes.Count == 0) { return(null); } PluginItemCollection plugins = OpenIdPlugins.Instance().GetPlugins(); if (plugins != null && plugins.Count > 0) { PluginItem[] items = plugins.Items; PluginItem[] array = items; foreach (PluginItem pluginItem in array) { if (!configedTypes.Contains(pluginItem.FullName.ToLower())) { plugins.Remove(pluginItem.FullName.ToLower()); } } } return(plugins); }