lib/rack/oauth2/rails.rb in rack-oauth2-server-1.0.0 vs lib/rack/oauth2/rails.rb in rack-oauth2-server-1.1.0
- old
+ new
@@ -34,11 +34,11 @@
#
# . . .
#
# protected
# def current_user
- # @current_user ||= User.find(oauth.resource) if oauth.authenticated?
+ # @current_user ||= User.find(oauth.identity) if oauth.authenticated?
# end
# end
#
# @see Helpers
# @see Filters
@@ -82,24 +82,13 @@
# Rack module settings.
#
# @return [Hash] Settings
def oauth
- @oauth ||= { :logger=>::Rails.logger }
+ @oauth ||= Server::Options.new
end
end
end
end
end
-
-class Rails::Configuration
- include Rack::OAuth2::Rails::Configuration
-end
-class ActionController::Base
- helper Rack::OAuth2::Rails::Helpers
- include Rack::OAuth2::Rails::Helpers
- extend Rack::OAuth2::Rails::Filters
-end
-# Add middleware now, but load configuration as late as possible.
-ActionController::Dispatcher.middleware.use Rack::OAuth2::Server, lambda { Rails.configuration.oauth }