I'm developing a Rails project that uses authlogic for authentication. And I have a part in that project that is realized with Flex, and I need to know how a user can be authenticated if he or she is logged in or not.
I've set up a webservice called UserSessionService
and I was trying to get the user who is logged in, but it doesn't work. If I try to get it with UserSession.find
, I just get a # as the result (and therefore that's always true).
Here's the UserSessionService.rb:
require 'weborb/context'
require 'rbconfig'
class UserSessionService
def login
UserSession.find
end
end
I tried to extend the UserSessionService
class from Authlogic::Session::Base
, but that doesn't work either.
I've made it now with an extra HTTPService in Flex that accesses a function in the UserSessions Controller. For more details, look at http://blog.sketchit.de/2009/12/flex-mit-ruby-on-rails-authlogic-authenitifizieren/ (sorry, only in german)
thx for your help! tux