lib/janus/controllers/sessions_controller.rb in janus-0.10.0 vs lib/janus/controllers/sessions_controller.rb in janus-0.10.1
- old
+ new
@@ -28,11 +28,11 @@
def create
if valid_resource?
janus.login(resource, :scope => janus_scope, :rememberable => params[:remember_me])
respond_with_success { redirect_after_sign_in(resource) }
else
- respond_with_failure :unauthorized
+ respond_with_failure :not_found, :status => :unauthorized
end
end
def destroy
janus.logout(janus_scope)
@@ -142,8 +142,8 @@
.tap(&:clean_up_passwords)
end
def load_resource_from_authentication_params
self.resource = resource_class.find_for_database_authentication(resource_authentication_params)
- respond_with_failure :unauthorized unless resource
+ respond_with_failure :not_found, :status => :unauthorized unless resource
end
end