spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-0.6.0 vs spec/dummy/config/initializers/doorkeeper.rb in doorkeeper-0.6.1

- old
+ new

@@ -3,27 +3,21 @@ # Currently supported options are :active_record, :mongoid2, :mongoid3, :mongo_mapper orm DOORKEEPER_ORM # This block will be called to check whether the # resource owner is authenticated or not - resource_owner_authenticator do |routes| + resource_owner_authenticator do # Put your resource owner authentication logic here. - # If you want to use named routes from your app you need - # to call them on routes object eg. - # routes.new_user_session_path - # e.g. User.find_by_id(session[:user_id]) || redirect_to(routes.new_user_session_url) - User.find_by_id(session[:user_id]) || redirect_to(routes.root_url, :alert => "Needs sign in.") + # e.g. User.find_by_id(session[:user_id]) || redirect_to(new_user_session_url) + User.find_by_id(session[:user_id]) || redirect_to(root_url, :alert => "Needs sign in.") end # If you want to restrict the access to the web interface for # adding oauth authorized applications you need to declare the # block below - # admin_authenticator do |routes| + # admin_authenticator do # # Put your admin authentication logic here. - # # If you want to use named routes from your app you need - # # to call them on routes object eg. - # # routes.new_admin_session_path - # Admin.find_by_id(session[:admin_id]) || redirect_to(routes.new_admin_session_url) + # Admin.find_by_id(session[:admin_id]) || redirect_to(new_admin_session_url) # end # Authorization Code expiration time (default 10 minutes). # access_token_expires_in 10.minutes