lib/rails/auth/config_builder.rb in rails-auth-2.2.2 vs lib/rails/auth/config_builder.rb in rails-auth-3.0.0
- old
+ new
@@ -29,25 +29,18 @@
end
def production(
config,
cert_filters: nil,
- require_cert: false,
- ca_file: nil,
error_page: Rails.root.join("public/403.html"),
monitor: nil
)
- raise ArgumentError, "no cert_filters given but require_cert is true" if require_cert && !cert_filters
- raise ArgumentError, "no ca_file given but cert_filters were set" if cert_filters && !ca_file
-
error_page_middleware(config, error_page)
if cert_filters
config.middleware.insert_before Rails::Auth::ACL::Middleware,
Rails::Auth::X509::Middleware,
- require_cert: require_cert,
cert_filters: cert_filters,
- ca_file: ca_file,
logger: Rails.logger
end
return unless monitor