Package com.onelogin.saml2.settings
Class IdPMetadataParser
- java.lang.Object
-
- com.onelogin.saml2.settings.IdPMetadataParser
-
public class IdPMetadataParser extends java.lang.ObjectIdPMetadataParser class of OneLogin's Java Toolkit. A class that implements the settings parser from IdP Metadata This class does not validate in any way the URL that is introduced, make sure to validate it properly before use it in a get_metadata method.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.LoggerLOGGERPrivate property to construct a logger for this class.
-
Constructor Summary
Constructors Constructor Description IdPMetadataParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Saml2SettingsinjectIntoSettings(Saml2Settings settings, java.util.Map<java.lang.String,java.lang.Object> metadataInfo)Inject metadata info into Saml2Settingsstatic java.util.Map<java.lang.String,java.lang.Object>parseFileXML(java.lang.String xmlFileName)Get IdP Metadata Info from XML filestatic java.util.Map<java.lang.String,java.lang.Object>parseFileXML(java.lang.String xmlFileName, java.lang.String entityId)Get IdP Metadata Info from XML filestatic java.util.Map<java.lang.String,java.lang.Object>parseFileXML(java.lang.String xmlFileName, java.lang.String entityId, java.lang.String desiredNameIdFormat, java.lang.String desiredSSOBinding, java.lang.String desiredSLOBinding)Get IdP Metadata Info from XML filestatic java.util.Map<java.lang.String,java.lang.Object>parseRemoteXML(java.net.URL xmlURL)Get IdP Metadata Info from XML filestatic java.util.Map<java.lang.String,java.lang.Object>parseRemoteXML(java.net.URL xmlURL, java.lang.String entityId)Get IdP Metadata Info from XML filestatic java.util.Map<java.lang.String,java.lang.Object>parseRemoteXML(java.net.URL xmlURL, java.lang.String entityId, java.lang.String desiredNameIdFormat, java.lang.String desiredSSOBinding, java.lang.String desiredSLOBinding)Get IdP Metadata Info from XML filestatic java.util.Map<java.lang.String,java.lang.Object>parseXML(org.w3c.dom.Document xmlDocument)Get IdP Metadata Info from XML Documentstatic java.util.Map<java.lang.String,java.lang.Object>parseXML(org.w3c.dom.Document xmlDocument, java.lang.String entityId)Get IdP Metadata Info from XML Documentstatic java.util.Map<java.lang.String,java.lang.Object>parseXML(org.w3c.dom.Document xmlDocument, java.lang.String entityId, java.lang.String desiredNameIdFormat, java.lang.String desiredSSOBinding, java.lang.String desiredSLOBinding)Get IdP Metadata Info from XML Document
-
-
-
Method Detail
-
parseXML
public static java.util.Map<java.lang.String,java.lang.Object> parseXML(org.w3c.dom.Document xmlDocument, java.lang.String entityId, java.lang.String desiredNameIdFormat, java.lang.String desiredSSOBinding, java.lang.String desiredSLOBinding) throws javax.xml.xpath.XPathExceptionGet IdP Metadata Info from XML Document- Parameters:
xmlDocument- XML document hat contains IdP metadataentityId- Entity Id of the desired IdP, if no entity Id is provided and the XML metadata contains more than one IDPSSODescriptor, the first is returneddesiredNameIdFormat- If available on IdP metadata, use that nameIdFormatdesiredSSOBinding- Parse specific binding SSO endpoint.desiredSLOBinding- Parse specific binding SLO endpoint.- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
javax.xml.xpath.XPathExpressionExceptionjavax.xml.xpath.XPathException
-
parseXML
public static java.util.Map<java.lang.String,java.lang.Object> parseXML(org.w3c.dom.Document xmlDocument, java.lang.String entityId) throws javax.xml.xpath.XPathExceptionGet IdP Metadata Info from XML Document- Parameters:
xmlDocument- XML document that contains IdP metadataentityId- Entity Id of the desired IdP, if no entity Id is provided and the XML metadata contains more than one IDPSSODescriptor, the first is returned- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
javax.xml.xpath.XPathException
-
parseXML
public static java.util.Map<java.lang.String,java.lang.Object> parseXML(org.w3c.dom.Document xmlDocument) throws javax.xml.xpath.XPathExceptionGet IdP Metadata Info from XML Document- Parameters:
xmlDocument- XML document that contains IdP metadata- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
javax.xml.xpath.XPathException
-
parseFileXML
public static java.util.Map<java.lang.String,java.lang.Object> parseFileXML(java.lang.String xmlFileName, java.lang.String entityId, java.lang.String desiredNameIdFormat, java.lang.String desiredSSOBinding, java.lang.String desiredSLOBinding) throws java.lang.ExceptionGet IdP Metadata Info from XML file- Parameters:
xmlFileName- Filename of the XML filename that contains IdP metadataentityId- Entity Id of the desired IdP, if no entity Id is provided and the XML metadata contains more than one IDPSSODescriptor, the first is returneddesiredNameIdFormat- If available on IdP metadata, use that nameIdFormatdesiredSSOBinding- Parse specific binding SSO endpoint.desiredSLOBinding- Parse specific binding SLO endpoint.- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
java.lang.Exception
-
parseFileXML
public static java.util.Map<java.lang.String,java.lang.Object> parseFileXML(java.lang.String xmlFileName, java.lang.String entityId) throws java.lang.ExceptionGet IdP Metadata Info from XML file- Parameters:
xmlFileName- Filename of the XML filename that contains IdP metadataentityId- Entity Id of the desired IdP, if no entity Id is provided and the XML metadata contains more than one IDPSSODescriptor, the first is returned- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
java.lang.Exception
-
parseFileXML
public static java.util.Map<java.lang.String,java.lang.Object> parseFileXML(java.lang.String xmlFileName) throws java.lang.ExceptionGet IdP Metadata Info from XML file- Parameters:
xmlFileName- Filename of the XML filename that contains IdP metadata- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
java.lang.Exception
-
parseRemoteXML
public static java.util.Map<java.lang.String,java.lang.Object> parseRemoteXML(java.net.URL xmlURL, java.lang.String entityId, java.lang.String desiredNameIdFormat, java.lang.String desiredSSOBinding, java.lang.String desiredSLOBinding) throws java.lang.ExceptionGet IdP Metadata Info from XML file- Parameters:
xmlURL- URL to the XML document that contains IdP metadataentityId- Entity Id of the desired IdP, if no entity Id is provided and the XML metadata contains more than one IDPSSODescriptor, the first is returneddesiredNameIdFormat- If available on IdP metadata, use that nameIdFormatdesiredSSOBinding- Parse specific binding SSO endpoint.desiredSLOBinding- Parse specific binding SLO endpoint.- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
java.lang.Exception
-
parseRemoteXML
public static java.util.Map<java.lang.String,java.lang.Object> parseRemoteXML(java.net.URL xmlURL, java.lang.String entityId) throws java.lang.ExceptionGet IdP Metadata Info from XML file- Parameters:
xmlURL- URL to the XML document that contains IdP metadataentityId- Entity Id of the desired IdP, if no entity Id is provided and the XML metadata contains more than one IDPSSODescriptor, the first is returned- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
java.lang.Exception
-
parseRemoteXML
public static java.util.Map<java.lang.String,java.lang.Object> parseRemoteXML(java.net.URL xmlURL) throws java.lang.ExceptionGet IdP Metadata Info from XML file- Parameters:
xmlURL- URL to the XML document that contains IdP metadata- Returns:
- Mapped values with metadata info in Saml2Settings format
- Throws:
java.lang.Exception
-
injectIntoSettings
public static Saml2Settings injectIntoSettings(Saml2Settings settings, java.util.Map<java.lang.String,java.lang.Object> metadataInfo)
Inject metadata info into Saml2Settings- Parameters:
settings- the Saml2Settings objectmetadataInfo- mapped values with metadata info in Saml2Settings format- Returns:
- the Saml2Settings object with metadata info settings loaded
-
-