Module: Saml::Config

Defined in:
lib/saml/config.rb

Constant Summary collapse

@@provider_type =
"service_provider"
@@max_issue_instant_offset =
2
@@ssl_private_key =
nil
@@ssl_certificate =
nil
@@http_ca_file =
nil
@@registered_stores =
{}
@@generate_key_name =
true
@@inclusive_namespaces_prefix_list =
"ds saml samlp xs"
@@include_nested_prefixlist =
false

Class Method Summary collapse

Class Method Details

.register_store(name, store, options = {}) ⇒ Object



32
33
34
35
# File 'lib/saml/config.rb', line 32

def register_store(name, store, options = {})
  registered_stores[name] = store
  self.default_store = name if options[:default]
end

.ssl_certificate_file=(certificate_file) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/saml/config.rb', line 47

def ssl_certificate_file=(certificate_file)
  if certificate_file.present?
    self.ssl_certificate = OpenSSL::X509::Certificate.new File.read(certificate_file)
  else
    self.ssl_certificate = nil
  end
end

.ssl_private_key_file=(private_key_file) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/saml/config.rb', line 38

def ssl_private_key_file=(private_key_file)
  if private_key_file.present?
    self.ssl_private_key = OpenSSL::PKey::RSA.new File.read(private_key_file)
  else
    self.ssl_private_key = nil
  end
end