Sha256: 6f15cf539a9ef29d5ce08552faacd2ea25c2432d7580e2d4509c6afe00fabfd3

Contents?: true

Size: 753 Bytes

Versions: 4

Compression:

Stored size: 753 Bytes

Contents

OpenStax::Connect::Engine.routes.draw do
  match '/auth/openstax/callback', to: 'sessions#omniauth_authenticated' #omniauth route
  get '/auth/openstax', :as => 'openstax_login'
  get 'sessions/new', :as => 'login'
  post 'sessions/become'
  
  # See https://github.com/plataformatec/devise/commit/f3385e96abf50e80d2ae282e1fb9bdad87a83d3c
  match 'sessions/destroy', :as => 'logout', :via => OpenStax::Connect.configuration.logout_via

  if OpenStax::Connect.configuration.enable_stubbing?
    namespace :dev do
      get 'users/login'
      post 'users/search'
    end
  end
end


module OpenStax
  module Connect
    hh = Engine.routes.url_helpers

    RouteHelper.register_path(:login, hh.openstax_login_path) { hh.dev_users_login_path }
  end
end


Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
openstax_connect-0.0.10 config/routes.rb
openstax_connect-0.0.9 config/routes.rb
openstax_connect-0.0.8 config/routes.rb
openstax_connect-0.0.7 config/routes.rb