/// <summary> /// Retrieves the specified application configuration from the SSO store, /// including both, the application metadata information and the application /// fields. /// </summary> /// <param name="appName">The name of the application to retrieve.</param> /// <returns>The instance of the SSOAppConfig.</returns> public static SSOAppConfig GetApplicationConfig(string appName) { return(new SSOAppConfig() { AppInfo = SSOManager.GetApplicationInfo(appName), AppFields = SSOManager.GetApplicationFields(appName) }); }
public static void UpdateApplicationFields(string appName, SSOAppFieldCollection appFields, bool recreate) { if (recreate == true) { SSOAppConfig appConfig = new SSOAppConfig() { // load the current application metadata information AppInfo = SSOManager.GetApplicationInfo(appName), // and use the application fields provided AppFields = appFields }; // update/recreate the application including the fields SSOManager.UpdateApplication(appConfig, true); } else { // just update the application fields ISSOConfigStore ssoConfigStore = new ISSOConfigStore(); ssoConfigStore.SetConfigInfo(appName, SSOManager.ConfigIdentifier, appFields); } }
/// <summary> /// Checks whether the specified application exists. /// </summary> /// <param name="appName">The name of the application.</param> /// <returns><b>true</b> if the application exists; otherwise <b>false</b>.</returns> public static bool ApplicationExists(string appName) { SSOAppInfo appInfo = SSOManager.GetApplicationInfo(appName); return(appInfo != null); }