Module: Saml::Kit::XmlTemplatable

Instance Method Summary collapse

Instance Method Details

#digest_methodObject



18
19
20
# File 'lib/saml/kit/xml_templatable.rb', line 18

def digest_method
  configuration.digest_method
end

#sign?Boolean

Returns true if an embedded signature is requested and at least one signing certificate is available via the configuration.

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/saml/kit/xml_templatable.rb', line 13

def sign?
  return configuration.sign? if embed_signature.nil?
  embed_signature && configuration.sign?
end

#signature_methodObject



22
23
24
# File 'lib/saml/kit/xml_templatable.rb', line 22

def signature_method
  configuration.signature_method
end

#signing_key_pairObject



26
27
28
# File 'lib/saml/kit/xml_templatable.rb', line 26

def signing_key_pair
  configuration.key_pairs(use: :signing).last
end

#template_pathObject



6
7
8
9
10
# File 'lib/saml/kit/xml_templatable.rb', line 6

def template_path
  root_path = File.expand_path(File.dirname(__FILE__))
  template_name = "#{self.class.name.split("::").last.underscore}.builder"
  File.join(root_path, "builders/templates/", template_name)
end