java.lang.Object
org.codelibs.saml2.core.settings.IdPMetadataParser
IdPMetadataParser class of 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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Saml2SettingsinjectIntoSettings(Saml2Settings settings, Map<String, Object> metadataInfo) Inject metadata info into Saml2SettingsparseFileXML(String xmlFileName) Get IdP Metadata Info from XML fileparseFileXML(String xmlFileName, String entityId) Get IdP Metadata Info from XML fileparseFileXML(String xmlFileName, String entityId, String desiredNameIdFormat, String desiredSSOBinding, String desiredSLOBinding) Get IdP Metadata Info from XML fileparseRemoteXML(URL xmlURL) Get IdP Metadata Info from XML fileparseRemoteXML(URL xmlURL, String entityId) Get IdP Metadata Info from XML fileparseRemoteXML(URL xmlURL, String entityId, String desiredNameIdFormat, String desiredSSOBinding, String desiredSLOBinding) Get IdP Metadata Info from XML fileGet IdP Metadata Info from XML DocumentGet IdP Metadata Info from XML DocumentparseXML(Document xmlDocument, String entityId, String desiredNameIdFormat, String desiredSSOBinding, String desiredSLOBinding) Get IdP Metadata Info from XML Document
-
Constructor Details
-
IdPMetadataParser
public IdPMetadataParser()
-
-
Method Details
-
parseXML
public static Map<String,Object> parseXML(Document xmlDocument, String entityId, String desiredNameIdFormat, String desiredSSOBinding, String desiredSLOBinding) Get 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
-
parseXML
Get 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
-
parseXML
Get IdP Metadata Info from XML Document- Parameters:
xmlDocument- XML document that contains IdP metadata- Returns:
- Mapped values with metadata info in Saml2Settings format
-
parseFileXML
public static Map<String,Object> parseFileXML(String xmlFileName, String entityId, String desiredNameIdFormat, String desiredSSOBinding, String desiredSLOBinding) Get 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
-
parseFileXML
Get 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
-
parseFileXML
Get 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
-
parseRemoteXML
public static Map<String,Object> parseRemoteXML(URL xmlURL, String entityId, String desiredNameIdFormat, String desiredSSOBinding, String desiredSLOBinding) Get 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
-
parseRemoteXML
Get 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
-
parseRemoteXML
Get 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
-
injectIntoSettings
public static Saml2Settings injectIntoSettings(Saml2Settings settings, Map<String, 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
-