app/controllers/openstax/api/v1/api_controller.rb in openstax_api-2.3.1 vs app/controllers/openstax/api/v1/api_controller.rb in openstax_api-2.4.0
- old
+ new
@@ -6,19 +6,13 @@
include ::Roar::Rails::ControllerAdditions
include OpenStax::Api::Roar
include OpenStax::Api::Apipie
- skip_protect_beta if respond_to? :skip_protect_beta
-
- skip_before_filter :authenticate_user!
doorkeeper_for :all, :unless => :session_user?
skip_before_filter :verify_authenticity_token, :unless => :session_user?
- # This filter can wait until the user signs in again
- skip_interception :expired_password if respond_to? :skip_interception
-
respond_to :json
# Keep old current_user method so we can use it
alias_method :current_session_user,
OpenStax::Api.configuration.current_user_method
@@ -36,15 +30,9 @@
current_api_user.application
end
def current_human_user
current_api_user.human_user
- end
-
- # JSON can't really redirect
- # Redirect from a filter effectively means "deny access"
- def redirect_to(options = {}, response_status = {})
- head :forbidden
end
protected
def session_user?
\ No newline at end of file