EDIT I've modified things somewhat
public static void ClearConfig(int portalId) { string key = CACHEKEY + "_" + portalId.ToString(); DataCache.RemoveCache(key); }
and
public static ScanToLoginAuthConfig GetConfig(int portalId) { string key = CACHEKEY + "_" + portalId.ToString();
Have become
public static void UpdateConfig(ScanToLoginAuthConfig config) { PortalController.UpdatePortalSetting(config.PortalId, "DNN_ScanToLogin_Enabled", config.Enabled.ToString()); ClearConfig(config.PortalId); }
and
public static ScanToLoginAuthConfig GetConfig(int portalId) { string key = CACHEKEY;// +"_" + portalId.ToString();
Respectively. So now the keys seem to update and set correctly (for my unspecified definition of correctly...) However when I disable the default authentication provider and enable my authentication provider, it still does not display my provider and instead shows the default. When both default and mine are enabled, then both display, tabbed.
I also updated the following to include the key's name as it is defined at the top of the code.
public static void UpdateConfig(ScanToLoginAuthConfig config) { PortalController.UpdatePortalSetting(config.PortalId, "DNN_ScanToLogin_Enabled", config.Enabled.ToString()); ClearConfig(config.PortalId); }