lib/authlogic_connect/common/state.rb in authlogic-connect-0.0.5.1 vs lib/authlogic_connect/common/state.rb in authlogic-connect-0.0.6
- old
+ new
@@ -27,6 +27,19 @@
def validate_password_with_openid?
!using_oauth? && super
end
+ # because user and session are so closely tied together, I am still
+ # uncertain as to how they are saved. So this makes sure if we are
+ # logging in, it must be saving the session, otherwise the user.
+ def correct_request_class?
+ return false unless auth_params?
+
+ if is_auth_session?
+ auth_type.to_s == "session"
+ else
+ auth_type.to_s == "user"
+ end
+ end
+
end