lib/challah/techniques/api_key_technique.rb in challah-1.4.2 vs lib/challah/techniques/api_key_technique.rb in challah-1.5.0
- old
+ new
@@ -14,11 +14,11 @@
return nil unless Challah.options[:api_key_enabled]
unless @key.to_s.blank?
user = user_model.find_by_api_key(@key)
- if user and user.active?
+ if user and user.valid_session?
return user
end
end
nil
@@ -31,6 +31,6 @@
def user_model
@user_model ||= Challah.user
end
end
-end
\ No newline at end of file
+end