Module: Saml::Kit::XmlTemplatable

Instance Method Summary collapse

Instance Method Details

#digest_methodObject



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

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.



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

def sign?
  return configuration.sign? if embed_signature.nil?
  (embed_signature && configuration.sign?) ||
    (embed_signature && @signing_key_pair.present?)
end

#signature_methodObject



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

def signature_method
  configuration.signature_method
end

#signing_key_pairObject



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

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