Class OmpassGlobalConfig

All Implemented Interfaces:
ExtensionPoint, Describable<GlobalConfiguration>, Saveable, Loadable, OnMaster

@Extension @Symbol("ompass-2fa") public class OmpassGlobalConfig extends GlobalConfiguration
Global configuration for the OMPASS 2FA plugin. Stores the OMPASS server URL, client credentials, and 2FA enabled state. Shown on the Manage Jenkins > Security page.
  • Constructor Details

    • OmpassGlobalConfig

      @DataBoundConstructor public OmpassGlobalConfig()
  • Method Details

    • get

      public static OmpassGlobalConfig get()
      Returns the singleton instance of this configuration.
      Returns:
      the global OMPASS configuration object, or null if not available
    • getCategory

      @NonNull public GlobalConfigurationCategory getCategory()
      Overrides:
      getCategory in class Descriptor<GlobalConfiguration>
    • configure

      public boolean configure(org.kohsuke.stapler.StaplerRequest2 req, net.sf.json.JSONObject json) throws Descriptor.FormException
      Overrides:
      configure in class GlobalConfiguration
      Throws:
      Descriptor.FormException
    • getOmpassServerUrl

      public String getOmpassServerUrl()
    • getClientId

      public String getClientId()
    • getSecretKey

      public Secret getSecretKey()
    • isEnableOmpass2fa

      public boolean isEnableOmpass2fa()
    • getLanguage

      public String getLanguage()
    • setOmpassServerUrl

      @DataBoundSetter public void setOmpassServerUrl(String ompassServerUrl)
    • setClientId

      @DataBoundSetter public void setClientId(String clientId)
    • setSecretKey

      @DataBoundSetter public void setSecretKey(Secret secretKey)
    • setEnableOmpass2fa

      @DataBoundSetter public void setEnableOmpass2fa(boolean enableOmpass2fa)
    • setLanguage

      @DataBoundSetter public void setLanguage(String language)
    • doFillLanguageItems

      public ListBoxModel doFillLanguageItems()
    • doCheckOmpassServerUrl

      @POST public FormValidation doCheckOmpassServerUrl(@QueryParameter String value)
    • doCheckClientId

      @POST public FormValidation doCheckClientId(@QueryParameter String value)
    • doCheckSecretKey

      @POST public FormValidation doCheckSecretKey(@QueryParameter String value)
    • doTestConnection

      @POST public FormValidation doTestConnection(@QueryParameter String ompassServerUrl, @QueryParameter String clientId, @QueryParameter String secretKey)