Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i authenticate users out of rails with authlogic?

Tags:

ruby

authlogic

In my system, users registering via rails website. I have to authenticate users from a custom application server written in ruby.

error messsage:

You must activate the Authlogic::Session::Base.controller with a controller object before creating objects (Authlogic::Session::Activation::NotActivatedError)
like image 714
airy Avatar asked Aug 28 '09 23:08

airy


1 Answers

From: http://rdoc.info/projects/binarylogic/authlogic

require "authlogic/test_case" # include at the top of test_helper.rb
setup :activate_authlogic # run before tests are executed
UserSession.create(users(:whomever)) # logs a user in
like image 80
user239662 Avatar answered Sep 22 '22 13:09

user239662