Class: Onelogin::Saml::EntityDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/onelogin/saml/entity_descriptor.rb

Instance Method Summary collapse

Constructor Details

#initializeEntityDescription

Returns a new instance of EntityDescription.



5
6
7
8
# File 'lib/onelogin/saml/entity_descriptor.rb', line 5

def initialize()
  url = "entity_descriptor.xml.erb"
  @template = File.read(File.join(File.dirname(__FILE__), url))
end

Instance Method Details

#generate(values) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/onelogin/saml/entity_descriptor.rb', line 10

def generate(values)
  entity_id = values["entity_id"]
  name_id_format = values["name_id_format"]
  assertion_consumer_service_location = values["assertion_consumer_service_location"]

  erb = ERB.new(@template)
  erb.result(binding)
end