Class: OneLogin::RubySaml::IdpMetadataParser
- Inherits:
- 
      Object
      
        - Object
- OneLogin::RubySaml::IdpMetadataParser
 
- Defined in:
- lib/onelogin/ruby-saml/idp_metadata_parser.rb
Overview
Auxiliary class to retrieve and parse the Identity Provider Metadata
Constant Summary collapse
- METADATA =
- "urn:oasis:names:tc:SAML:2.0:metadata"
- DSIG =
- "http://www.w3.org/2000/09/xmldsig#"
Instance Attribute Summary collapse
- 
  
    
      #document  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute document. 
- 
  
    
      #response  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute response. 
Instance Method Summary collapse
- 
  
    
      #parse(idp_metadata)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Parse the Identity Provider metadata and update the settings with the IdP values. 
- 
  
    
      #parse_remote(url, validate_cert = true)  ⇒ REXML::document 
    
    
  
  
  
  
  
  
  
  
  
    Parse the Identity Provider metadata and update the settings with the IdP values. 
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
| 22 23 24 | # File 'lib/onelogin/ruby-saml/idp_metadata_parser.rb', line 22 def document @document end | 
#response ⇒ Object (readonly)
Returns the value of attribute response.
| 23 24 25 | # File 'lib/onelogin/ruby-saml/idp_metadata_parser.rb', line 23 def response @response end | 
Instance Method Details
#parse(idp_metadata) ⇒ Object
Parse the Identity Provider metadata and update the settings with the IdP values
| 39 40 41 42 43 44 45 46 47 48 49 | # File 'lib/onelogin/ruby-saml/idp_metadata_parser.rb', line 39 def parse() @document = REXML::Document.new() OneLogin::RubySaml::Settings.new.tap do |settings| settings.idp_entity_id = idp_entity_id settings.name_identifier_format = idp_name_id_format settings.idp_sso_target_url = single_signon_service_url settings.idp_slo_target_url = single_logout_service_url settings.idp_cert_fingerprint = fingerprint end end | 
#parse_remote(url, validate_cert = true) ⇒ REXML::document
Parse the Identity Provider metadata and update the settings with the IdP values
| 31 32 33 34 | # File 'lib/onelogin/ruby-saml/idp_metadata_parser.rb', line 31 def parse_remote(url, validate_cert = true) = (url, validate_cert) parse() end |