Package org.jenkinsci.plugins.saml
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IdpMetadataConfiguration.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description IdpMetadataConfiguration(String xml)
Inline Constructor.IdpMetadataConfiguration(String url, Long period)
Idp Metadata downloaded from an Url Constructor.IdpMetadataConfiguration(String xml, String url, Long period)
Jelly Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createIdPMetadataFile()
Creates the IdP Metadata file (saml-idp.metadata.xml) in JENKINS_HOME using the configuration.String
getIdpMetadata()
Long
getPeriod()
String
getUrl()
String
getXml()
String
toString()
void
updateIdPMetadata()
Gets the IdP Metadata from an URL, then validate it and write it to a file (JENKINS_HOME/saml-idp.metadata.xml).-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
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.
-
-