[jifty-devel] RFC: Login/Logout functionality

John Peacock jpeacock at rowman.com
Tue Apr 25 11:02:13 EDT 2006

I finally had the time to extract (and update) the login/logout 
functionality from Wifty and add it to my Jifty app.  Before I try and 
make this completely generic, do people think that this functionality 
should be part of the core Jifty distro, or do I have to think about how 
to extend the core (via the as-yet-unwritten plugin framework)?

For discussion purposes, adding login/logout functionality to the core 
would require adding the following files:


The login/logout functionality also needs to extend Jifty::Dispatcher as 
well as the code in Jifty::ClassLoader to autogenerate the classes in 
the application space.

However extending Dispatcher and ClassLoader is likely to be the 
sticking point to adding this fuctionality outside of the core.  It 
appears that I could probably use a new ClassLoader object to extend the 
auto-creation magic, but I don't (currently) see a way to extend the 
Dispatcher actions (without requiring the user to cut/paste code into 
their own Dispatcher).

Personally, I think that login/logout functionality is so central to 
anything more than a very basic webapp that is should be present in the 
core.  I would propose adding a setting to config.yml that would link 
the core login code to the User class in the app, e.g.

	CurrentUserClass: MyApp::CurrentUser
	LoginUserClass: MyApp::User

and have the startup code confirm that MyApp::User has the appropriate 
functionality to support the core modules.  At some point, I'd like to 
replace the basic Login with one that will probe for a client 
certificate and use that instead of a username/password, but adding this 
to the core won't affect that.

Does this seem like a worthwhile avenue to pursue?


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

More information about the jifty-devel mailing list