Rails.application.config.middleware.use OmniAuth::Builder do
  provider :ldap, :host =>   'ldap-vip.internal.justin.tv',
                  :port =>   636,
                  :method => 'ssl',
                  :base =>   'dc=justin, dc=tv',
                  :uid =>    'uid'
end

OmniAuth.config.on_failure = Proc.new { |env|
  OmniAuth::FailureEndpoint.new(env).redirect_to_failure
}
