class Saml::IdpMetadataParser
- Saml::IdpMetadataParser
- Reference
- Object
Overview
Auxiliary class to retrieve and parse the Identity Provider 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 parse_remote method.
Read the Security warning
section of the README.md file to get more info
Included Modules
Defined in:
saml/idp_metadata_parser.crClass Method Summary
-
.get_idps(metadata_document : XML::Node, only_entity_id : String | Nil = nil)
fetch IdP descriptors from a metadata document
Instance Method Summary
- #document : XML::Node
- #options : Hash(Symbol, String)?
-
#parse(idp_metadata, options = {} of Symbol => String)
Parse the Identity Provider metadata and update the settings with the IdP values
-
#parse_remote(url, validate_cert = true, options = {} of Symbol => String)
Parse the Identity Provider metadata and update the settings with the IdP values
-
#parse_remote_to_array(url, validate_cert = true, options = {} of Symbol => String)
Parse all Identity Provider metadata and return the results as Array
-
#parse_remote_to_hash(url : STring, validate_cert = true, options = {} of Symbol => String)
Parse the Identity Provider metadata and return the results as Hash
-
#parse_to_array(idp_metadata, options = {} of Symbol => String)
Parse all Identity Provider metadata and return the results as Array
-
#parse_to_hash(idp_metadata, options = {} of Symbol => String)
Parse the Identity Provider metadata and return the results as Hash
- #parse_to_idp_metadata_array(idp_metadata, options : Nil | Hash(Symbol, String) = {} of Symbol => String)
- #response
Class Method Detail
fetch IdP descriptors from a metadata document
Instance Method Detail
Parse the Identity Provider metadata and update the settings with the IdP values
@param idp_metadata [String]
@param options [Hash] :settings to provide the Saml::Settings object or an hash for Settings overrides
@option options [Saml::Settings, Hash] :settings the Saml::Settings object which gets the parsed metadata merged into or an hash for Settings overrides.
@option options [String, nil] :entity_id when this is given, the entity descriptor for this ID is used. When omitted, the first entity descriptor is used.
@option options [String, Array
@return [Saml::Settings]
Parse the Identity Provider metadata and update the settings with the IdP values
@param url [String] Url where the XML of the Identity Provider Metadata is published. @param validate_cert [Boolean] If true and the URL is HTTPs, the cert of the domain is checked.
@param options [Hash] options used for parsing the metadata and the returned Settings instance
@option options [Saml::Settings, Hash] :settings the Saml::Settings object which gets the parsed metadata merged into or an hash for Settings overrides.
@option options [String, nil] :entity_id when this is given, the entity descriptor for this ID is used. When omitted, the first entity descriptor is used.
@option options [String, Array
@return [Saml::Settings]
@raise [HttpError] Failure to fetch remote IdP metadata
Parse all Identity Provider metadata and return the results as Array
@param url [String] Url where the XML of the Identity Provider Metadata is published. @param validate_cert [Boolean] If true and the URL is HTTPs, the cert of the domain is checked.
@param options [Hash] options used for parsing the metadata
@option options [String, nil] :entity_id when this is given, the entity descriptor for this ID is used. When omitted, all found IdPs are returned.
@option options [String, Array
@return [Array
@raise [HttpError] Failure to fetch remote IdP metadata
Parse the Identity Provider metadata and return the results as Hash
@param url [String] Url where the XML of the Identity Provider Metadata is published. @param validate_cert [Boolean] If true and the URL is HTTPs, the cert of the domain is checked.
@param options [Hash] options used for parsing the metadata
@option options [String, nil] :entity_id when this is given, the entity descriptor for this ID is used. When omitted, the first entity descriptor is used.
@option options [String, Array
@return [Hash]
@raise [HttpError] Failure to fetch remote IdP metadata
Parse all Identity Provider metadata and return the results as Array
@param idp_metadata [String]
@param options [Hash] options used for parsing the metadata and the returned Settings instance
@option options [String, nil] :entity_id when this is given, the entity descriptor for this ID is used. When omitted, all found IdPs are returned.
@option options [String, Array
@return [Array
Parse the Identity Provider metadata and return the results as Hash
@param idp_metadata [String]
@param options [Hash] options used for parsing the metadata and the returned Settings instance
@option options [String, nil] :entity_id when this is given, the entity descriptor for this ID is used. When omitted, the first entity descriptor is used.
@option options [String, Array
@return [Hash]