Sha256: e8fc1bc4b68e6774cba2c65a511f1e6ef0dcffe9cba6c71079a462b4dd7331ae

Contents?: true

Size: 694 Bytes

Versions: 6

Compression:

Stored size: 694 Bytes

Contents

require 'nokogiri'

require 'saml2/endpoint'
require 'saml2/sso'

module SAML2
  class ServiceProvider < SSO
    class << self
      alias_method :from_xml, :new
    end

    def initialize(root)
      @root = root
    end

    def assertion_consumer_services
      @assertion_consumer_services ||= begin
        nodes = @root.xpath('md:AssertionConsumerService', Namespaces::ALL)
        Endpoint::Indexed::Array.from_xml(nodes)
      end
    end

    def attribute_consuming_services
      @attribute_consuming_services ||= begin
        nodes = @root.xpath('md:AttributeConsumingService', Namespaces::ALL)
        AttributeConsumingService::Array.from_xml(nodes)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
saml2-1.0.5 lib/saml2/service_provider.rb
saml2-1.0.4 lib/saml2/service_provider.rb
saml2-1.0.3 lib/saml2/service_provider.rb
saml2-1.0.2 lib/saml2/service_provider.rb
saml2-1.0.1 lib/saml2/service_provider.rb
saml2-1.0.0 lib/saml2/service_provider.rb