class Shibkit::MetaMeta::IDP

Class to represent an IDP

Constants

MDUI_ROOT
REQUIRED_QUACKS
ROOT_ELEMENT

Element and attribute used to select XML for new objects

TARGET_ATTR

Attributes

attributes[RW]
nameid_formats[RW]
protocols[RW]
scopes[RW]

Scopes used by the entity (if an IDP)

Private Instance Methods

parse_xml() click to toggle source
Calls superclass method
# File lib/shibkit/meta_meta/idp.rb, line 43
def parse_xml
  
  super
  
  @scopes = @noko.xpath('xmlns:IDPSSODescriptor/xmlns:Extensions/shibmd:Scope').collect do |sx|
  
   sx['regexp'] == 'true' ? Regexp.new(sx.text) : sx.text  
    
  end 
 
  
  @valid = @noko.xpath('xmlns:IDPSSODescriptor[1]').empty? ? false : true
  
  proto_set = @noko.xpath('xmlns:IDPSSODescriptor/@protocolSupportEnumeration')[0]
  @protocols = proto_set.value.split(' ') if proto_set 
  
  @nameid_formats ||= Array.new
  @noko.xpath('xmlns:IDPSSODescriptor/xmlns:NameIDFormat').each do |nx|
    
    @nameid_formats << nx.content
    
  end
  
  @attributes ||= Array.new
  @noko.xpath('xmlns:IDPSSODescriptor/saml:Attribute').each do |ax|
    
    @attributes << Shibkit::MetaMeta::Attribute.new(ax).filter
    
  end
  
  log.debug "  Derived IdP from XML" if filter
  
end