Skip to content

Commit

Permalink
Frontend - simplify Warden configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
etdsoft committed Jun 30, 2014
1 parent 813cb16 commit 4ef6bd1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions engines/frontend/lib/dradis/frontend/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,14 @@ class Engine < ::Rails::Engine
app.config.assets.precompile += ["dradis/frontend/manifests/*"]
end

# Install the Warden middleware in the application's stack. We use our own
# shared password strategy.
initializer 'frontend.warden' do |app|

Rails.configuration.middleware.use Warden::Manager do |manager|
manager.default_strategies :shared_password
manager.failure_app = ->(env){ SessionsController.action(:new).call(env) }
end

# FIXME: do we need these two?
#Warden::Manager.serialize_into_session do |user|
# user
#end
#
#Warden::Manager.serialize_from_session do |id|
# id
#end

Warden::Strategies.add(:shared_password, Dradis::Frontend::WardenStrategy)
end
end
Expand Down

0 comments on commit 4ef6bd1

Please sign in to comment.