I am using ActiveResource against a non-Rails REST API... in fact even the "Rest" part is doubtful but they tried:
Although RESTful applications are ideally stateless, the ALM platform requires sessions to manage locking, client life time, and perform other basic tasks. Session management is performed using a cookie named QCSession.
Anyway, I need to issue one GET to "authentication-point/authenticate" to get a user authenticated and take a cookie back. Just not sure how to do that. Here is what I have but I am getting a 404 error:
class AlmActiveResource < ActiveResource::Base
attr_accessor :lwsso_cookie, :qcsession_cookie
self.site = "http://alm_url/qcbin/"
self.user = "name"
self.password = "pw"
def self.authentication
@auth_point = "authentication-point/authenticate"
self.prefix(@auth_point)
meow = self.get(:authenticate)
Rails.logger.debug("Meow: #{meow.inspect}")
end
end