protected override void OnLoad(EventArgs e) { Auth0ConfigBase config = Auth0ConfigBase.GetConfig(PortalId); SettingsEditor.DataSource = config; SettingsEditor.DataBind(); }
public override void UpdateSettings() { if (SettingsEditor.IsValid && SettingsEditor.IsDirty) { var config = (Auth0ConfigBase)SettingsEditor.DataSource; Auth0ConfigBase.UpdateConfig(config); } }
public static void UpdateConfig(Auth0ConfigBase config) { PortalController.UpdatePortalSetting(config.PortalID, _Service + _ClientId, config.ClientId); PortalController.UpdatePortalSetting(config.PortalID, _Service + _ClientSecret, config.ClientSecret); PortalController.UpdatePortalSetting(config.PortalID, _Service + _ConnectionName, config.ConnectionName); PortalController.UpdatePortalSetting(config.PortalID, _Service + _TenantDomain, config.TenantDomain); PortalController.UpdatePortalSetting(config.PortalID, _Service + _Enabled, config.Enabled.ToString(CultureInfo.InvariantCulture)); ClearConfig(config.PortalID); }
public static Auth0ConfigBase GetConfig(int portalId) { string key = GetCacheKey(portalId); var config = (Auth0ConfigBase)DataCache.GetCache(key); if (config == null) { config = new Auth0ConfigBase(portalId); DataCache.SetCache(key, config); } return(config); }
public Auth0Client(int portalId) { Config = Auth0ConfigBase.GetConfig(portalId); RedirectUrl = Globals.LoginURL(String.Empty, false); }