title: Configuring routes in devise when only using omniauth for authentication
body: <p>I have built an application which allows a user to authenticate against Active Directory using omniauth-ldap.  If this is a new user, the successful authentication creates a user for them based on information returned from AD.  If the user already exists, it just logs them in.  Users do not register for the application, they just log in with AD credentials.  And I never want the user to log in with database credentials.</p>
  
  <p>I can't figure out how to get rid of or change around some of the routes.  For example if a user visits /sign_in they get the database authentication.  And if the user visits sign_up they are taken to a page to register for the site.  I would like for users that visit /sign_in to be taken to the LDAP login which is /users/auth/ldap.  I think I need to make a custom route, but I'm not sure which controller I need to direct the user to.  And I want to make the sign_up page go away entirely.</p>
  
  <p>Right now I have a link that allows users to log in using ldap, and the path for that is user_omniauth_authorize_path(:ldap).  I'm just not sure how to translate that into something that my config/routes.rb file understands.  This is what I have in routes right now.</p>
  
  <pre><code>   devise_for :users, :controllers =&gt; { :omniauth_callbacks =&gt; "users/omniauth_callbacks" }  do  
        get 'sign_in', :to =&gt; 'devise/sessions#new', :as =&gt; :new_user_session
        get 'sign_out', :to =&gt; 'devise/sessions#destroy', :as =&gt; :destroy_user_session
    end 
  </code></pre>
  
  <p>When I run rake routes I do not see any route for user_omniauth_authorize_path which I presume is because that route is being generated by devise.  So I think I need to have my routes point to a devise controller, but I can't seem to find the right path.</p>