Class: Saml::Kit::Builders::Metadata
- Inherits:
-
Object
- Object
- Saml::Kit::Builders::Metadata
- Includes:
- XmlTemplatable
- Defined in:
- lib/saml/kit/builders/metadata.rb
Overview
Constant Summary
Constants included from XmlTemplatable
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#contact_email ⇒ Object
Returns the value of attribute contact_email.
-
#entity_id ⇒ Object
Returns the value of attribute entity_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#identity_provider ⇒ Object
Returns the value of attribute identity_provider.
-
#organization_name ⇒ Object
Returns the value of attribute organization_name.
-
#organization_url ⇒ Object
Returns the value of attribute organization_url.
-
#service_provider ⇒ Object
Returns the value of attribute service_provider.
Instance Method Summary collapse
- #build ⇒ Object
- #build_identity_provider ⇒ Object
- #build_service_provider ⇒ Object
-
#initialize(configuration: Saml::Kit.configuration) ⇒ Metadata
constructor
A new instance of Metadata.
Methods included from XmlTemplatable
#digest_method, #sign?, #signature_method, #signing_key_pair, #template_name, #template_path
Constructor Details
#initialize(configuration: Saml::Kit.configuration) ⇒ Metadata
Returns a new instance of Metadata.
18 19 20 21 22 |
# File 'lib/saml/kit/builders/metadata.rb', line 18 def initialize(configuration: Saml::Kit.configuration) @id = ::Xml::Kit::Id.generate @entity_id = configuration.entity_id @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
16 17 18 |
# File 'lib/saml/kit/builders/metadata.rb', line 16 def configuration @configuration end |
#contact_email ⇒ Object
Returns the value of attribute contact_email.
14 15 16 |
# File 'lib/saml/kit/builders/metadata.rb', line 14 def contact_email @contact_email end |
#entity_id ⇒ Object
Returns the value of attribute entity_id.
11 12 13 |
# File 'lib/saml/kit/builders/metadata.rb', line 11 def entity_id @entity_id end |
#id ⇒ Object
Returns the value of attribute id.
12 13 14 |
# File 'lib/saml/kit/builders/metadata.rb', line 12 def id @id end |
#identity_provider ⇒ Object
Returns the value of attribute identity_provider.
13 14 15 |
# File 'lib/saml/kit/builders/metadata.rb', line 13 def identity_provider @identity_provider end |
#organization_name ⇒ Object
Returns the value of attribute organization_name.
14 15 16 |
# File 'lib/saml/kit/builders/metadata.rb', line 14 def organization_name @organization_name end |
#organization_url ⇒ Object
Returns the value of attribute organization_url.
14 15 16 |
# File 'lib/saml/kit/builders/metadata.rb', line 14 def organization_url @organization_url end |
#service_provider ⇒ Object
Returns the value of attribute service_provider.
15 16 17 |
# File 'lib/saml/kit/builders/metadata.rb', line 15 def service_provider @service_provider end |
Instance Method Details
#build ⇒ Object
40 41 42 |
# File 'lib/saml/kit/builders/metadata.rb', line 40 def build Saml::Kit::Metadata.from(to_xml) end |
#build_identity_provider ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/saml/kit/builders/metadata.rb', line 32 def build_identity_provider @identity_provider = Saml::Kit::IdentityProviderMetadata.builder( configuration: configuration ) do |x| yield x if block_given? end end |
#build_service_provider ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/saml/kit/builders/metadata.rb', line 24 def build_service_provider @service_provider = Saml::Kit::ServiceProviderMetadata.builder( configuration: configuration ) do |x| yield x if block_given? end end |