lib/ruby-saml-idp.rb in ruby-saml-idp-0.2.5 vs lib/ruby-saml-idp.rb in ruby-saml-idp-0.2.6
- old
+ new
@@ -1,24 +1,18 @@
+# encoding: utf-8
module SamlIdp
- autoload :Controller, 'saml-idp/controller'
- autoload :Default, 'saml-idp/default'
- autoload :Engine, 'saml-idp/engine'
- autoload :Version, 'saml-idp/version'
+ require 'saml-idp/configurator'
+ require 'saml-idp/controller'
+ require 'saml-idp/default'
+ require 'saml-idp/version'
+ require 'saml-idp/engine' if defined?(::Rails) && Rails::VERSION::MAJOR > 2
- def self.x509_certificate
- @@x509_certificate
+ def self.config=(config)
+ @config = config
end
- def self.x509_certificate=(x509_certificate)
- @@x509_certificate = x509_certificate
- end
- @@x509_certificate = Default::X509_CERTIFICATE
- def self.secret_key
- @@secret_key
+ def self.config
+ @config ||= SamlIdp::Configurator.new
end
- def self.secret_key=(secret_key)
- @@secret_key = secret_key
- end
- @@secret_key = Default::SECRET_KEY
end