Class IdpMetadataConfiguration

java.lang.Object
hudson.model.AbstractDescribableImpl<IdpMetadataConfiguration>
org.jenkinsci.plugins.saml.IdpMetadataConfiguration
All Implemented Interfaces:
Describable<IdpMetadataConfiguration>

public class IdpMetadataConfiguration extends AbstractDescribableImpl<IdpMetadataConfiguration>
Class to store the info about how to manage the IdP Metadata.
  • Constructor Details

    • IdpMetadataConfiguration

      @DataBoundConstructor public IdpMetadataConfiguration(String xml, String url, Long period)
      Jelly Constructor.
      Parameters:
      xml - Idp Metadata XML. if xml is null, url and period should not.
      url - Url to download the IdP Metadata.
      period - Period in minutes between updates of the IdP Metadata.
    • IdpMetadataConfiguration

      public IdpMetadataConfiguration(@NonNull String xml)
      Inline Constructor.
      Parameters:
      xml - IdP Metadata XML.
    • IdpMetadataConfiguration

      public IdpMetadataConfiguration(@NonNull String url, @NonNull Long period)
      Idp Metadata downloaded from an Url Constructor.
      Parameters:
      url - URL to grab the IdP Metadata.
      period - Period between updates of the IdP Metadata.
  • Method Details

    • getXml

      public String getXml()
    • getUrl

      public String getUrl()
    • getPeriod

      public Long getPeriod()
    • getIdpMetadata

      public String getIdpMetadata() throws IOException
      Returns:
      Return the Idp Metadata from the XML file JENKINS_HOME/saml-idp.metadata.xml.
      Throws:
      IOException - in case it can not read the IdP Metadata file.
    • createIdPMetadataFile

      public void createIdPMetadataFile() throws IOException
      Creates the IdP Metadata file (saml-idp.metadata.xml) in JENKINS_HOME using the configuration.
      Throws:
      IOException - in case of error writing the file.
    • updateIdPMetadata

      public void updateIdPMetadata() throws IOException
      Gets the IdP Metadata from an URL, then validate it and write it to a file (JENKINS_HOME/saml-idp.metadata.xml).
      Throws:
      IOException - in case of error writing the file or validating the content.
    • toString

      public String toString()
      Overrides:
      toString in class Object