Choosing a user login/authentication system

hi,

i’m at the point in my app where i’m ready to release it into the wild
(in this
case my internal work intranet, not on the internet), and the only thing
holding it up is the implementation of a some sort of
login/authentication
system.

i know there are a bunch of login system generators and plugins that are
available, but I’m not sure which one to use. the setup of the
application is
extremely simple; basically a list of products with some detail
information
that i (the admin) updates, and the rest of the world only has read-only
access. no shopping carts, no designer/author/publisher paradigms-- you
either
can change the data or you can’t.

for such a simple case, should I even bother with a prefab solution, and
just
write one myself? or is that a recipe for disaster (keeping in mind a
looming
deadline and limited, but growing, ruby/rails skills)? if a home-grown
solution is not the answer, which of the available pre-made modules
would be
best for this situation?

thanks in advance for any insight.

If you want to use a prefab one I think Login Engine is the one for you.

http://rails-engines.rubyforge.org/wiki/wiki.pl?LoginEngine

I haven’t used it but it seems like the right one for simple cases. It
is an
engine so it is easy to upgrade.

  • Peter

Peter M. <petermichaux@…> writes:

If you want to use a prefab one I think Login Engine is the one for
you.http://rails-engines.rubyforge.org/wiki/wiki.pl?LoginEngine
I haven’t used it but it seems like the right one for simple cases. It is an
engine so it is easy to upgrade.

Peter,

Thanks for the heads up on the LoginEngine, it looks like a good
starting
point. Although, I am running into problems getting it up and running.

I’m following the instructions for installing the Engine plugin at
http://rails-
engines.rubyforge.org/rdoc/engines/ but when i get to:

→ cd vendor/plugins/login-engine
→ rake rdoc

I get:
–>> rake aborted!
–>> Don’t know how to build task ‘rdoc’

So, skipping that, I move onto the next step,

→ cd vendor/plugins/login-engine
→ rake db_schema_import

I get:
–>> No such file to load – db/schema.rb

however, schema.rb is clearly in the db/ folder. Neither command
worked, so I
don’t have a functional LoginEngine. I know you mentioned you don’t
have any
experience with this engine… anyone else have any thoughts on what I
may be
doing wrong?

I’m on WinXP/Rails 1.0RC3

Thanks

I suspect the documentation you are refering to is the Engines README,
which describes only an example engine rather than anything real,
whereas you might make better progress looking at the actual
LoginEngine documentation:

http://rails-engines.rubyforge.org/rdoc/login_engine/

I guess I should make this clear: ‘Engines’ are a means for
distributing code, exactly like plugins (in fact they are
plugins). The LoginEngine is just one possible engine.

To install the LoginEngine, install the Engines plugin and the
LoginEngine in the same way you would any other plugin, using the
‘script/plugin’ install command. Then follow the instructions for the
specific engines you are working with…

  • james

On 11/29/05, James A. [email protected] wrote:

To install the LoginEngine, install the Engines plugin and the
LoginEngine in the same way you would any other plugin, using the
‘script/plugin’ install command. Then follow the instructions for the
specific engines you are working with…

  • james

I’m still unclear on the difference between a plugin and an engine.

2005/11/29, dave davidson [email protected]:

I’m on WinXP/Rails 1.0RC3

rdoc through rake does not work on Windows. Your other problem
though… Are you in the right folder ? You need to cd
vendor\plugins\login_engine before you can run those Rake tasks.

Hope that helps !

Okie doke, here goes:

A plugin is an encapsulated bit of logic, probably (but certainly not
limited to) including modules to enhance ActiveRecord objects, or
application helpers

An ‘engine’ is a plugin which also can include views, full
controllers, model objects, schema and migration data - almost
anything you might want to put in a normal Rails application. You
can’t include things like views and migrations in normal rails plugins
and have them ‘just work’

The actual ‘Engines’ plugin is the plugin which enhances your normal
Rails application such that the extra views/controllers/migrations/etc
in your plugins get intelligently mixed in to your application - i.e.
it contains the code that makes things ‘just work’.

The LoginEngine/UserEngine/WikiEngine/WhateverEngine are examples of
plugins which takes advantage of the features provided by the Engines
plugin… therefore we (I) call them ‘engines’.

I’m aware of this kind of confusion where one might believe that
Engines == LoginEngine, and that if you’re using Engines at all then
you MUST be using the LoginEngine, which is only as true as saying
that the Generators == SHLG.

‘Engines’ are a way of sharing code. The ‘LoginEngine’ is an example -
an ‘instance’ if you like OO parlance. If you have a chunk of code in
the form of controllers/models/views that you find yourself reusing in
multiple projects, you might consider turning them into an
‘engine’-style plugin in the same manner you might think about making
them into a generator (I would argue that engines (and in fact all
plugins) are much easier to build and maintain than generators,
though).

So, to recap, you’ve got:

  1. normal plugins… then
  2. the Engines plugin, which is a normal plugin that uses the
    regular plugin mechanism to enhance Rails so you can then use and
    develop your own
  3. ‘Engines’, i.e. the LoginEngine or WikiEngine, which are just like
    plugins except they can provide views, etc, AND they depend on the
    ‘Engines plugin’ to blend their ‘advanced’ features into your
    application.

Does that make more sense?

  • james

James,

Maybe post this explaination on your engines wiki for future reference?
It
is a nice introduction. Perhaps it could be expanded over time with more
full details and explaination.

Peter

On 11/29/05, James A. [email protected] wrote:

and have them ‘just work’

them into a generator (I would argue that engines (and in fact all
3. ‘Engines’, i.e. the LoginEngine or WikiEngine, which are just like
plugins except they can provide views, etc, AND they depend on the
‘Engines plugin’ to blend their ‘advanced’ features into your
application.

Does that make more sense?

Yes, thanks!