Class: Saml::Kit::Builders::Metadata
- Inherits:
-
Object
- Object
- Saml::Kit::Builders::Metadata
- Includes:
- XmlTemplatable
- Defined in:
- lib/saml/kit/builders/metadata.rb
Overview
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_path
Constructor Details
#initialize(configuration: Saml::Kit.configuration) ⇒ Metadata
Returns a new instance of Metadata.
16 17 18 19 20 |
# File 'lib/saml/kit/builders/metadata.rb', line 16 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.
14 15 16 |
# File 'lib/saml/kit/builders/metadata.rb', line 14 def configuration @configuration end |
#contact_email ⇒ Object
Returns the value of attribute contact_email.
12 13 14 |
# File 'lib/saml/kit/builders/metadata.rb', line 12 def contact_email @contact_email end |
#entity_id ⇒ Object
Returns the value of attribute entity_id.
9 10 11 |
# File 'lib/saml/kit/builders/metadata.rb', line 9 def entity_id @entity_id end |
#id ⇒ Object
Returns the value of attribute id.
10 11 12 |
# File 'lib/saml/kit/builders/metadata.rb', line 10 def id @id end |
#identity_provider ⇒ Object
Returns the value of attribute identity_provider.
11 12 13 |
# File 'lib/saml/kit/builders/metadata.rb', line 11 def identity_provider @identity_provider end |
#organization_name ⇒ Object
Returns the value of attribute organization_name.
12 13 14 |
# File 'lib/saml/kit/builders/metadata.rb', line 12 def organization_name @organization_name end |
#organization_url ⇒ Object
Returns the value of attribute organization_url.
12 13 14 |
# File 'lib/saml/kit/builders/metadata.rb', line 12 def organization_url @organization_url end |
#service_provider ⇒ Object
Returns the value of attribute service_provider.
13 14 15 |
# File 'lib/saml/kit/builders/metadata.rb', line 13 def service_provider @service_provider end |
Instance Method Details
#build ⇒ Object
34 35 36 |
# File 'lib/saml/kit/builders/metadata.rb', line 34 def build Saml::Kit::Metadata.from(to_xml) end |
#build_identity_provider ⇒ Object
28 29 30 31 32 |
# File 'lib/saml/kit/builders/metadata.rb', line 28 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
22 23 24 25 26 |
# File 'lib/saml/kit/builders/metadata.rb', line 22 def build_service_provider @service_provider = Saml::Kit::ServiceProviderMetadata.builder(configuration: configuration) do |x| yield x if block_given? end end |