[Jifty-commit] r2458 - jifty/trunk/doc
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Jan 4 17:51:22 EST 2007
Author: nelhage
Date: Thu Jan 4 17:51:19 2007
New Revision: 2458
Added:
jifty/trunk/doc/jifty-plugins-2.0
Log:
Added notes from plugins design session
Added: jifty/trunk/doc/jifty-plugins-2.0
==============================================================================
--- (empty file)
+++ jifty/trunk/doc/jifty-plugins-2.0 Thu Jan 4 17:51:19 2007
@@ -0,0 +1,74 @@
+* Plugins and actions need to work better
+* Plugins should be able to create model classes
+* So should applications
+* Plugins can add columns to model classes
+* Plugins can add logic to model classes (before_*, after_* hooks)
+* Plugins should be able to add properties to columns
+* The app always overrides plugins
+* Plugins are loaded and evaluated in order
+* Models should become mixins when appropriate
+ - But if the app doesn't define one, they can create classes/tables
+
+
+The plugins we want in our ponyverse:
+* ::Users
+* ::Users::Identity::EmailedToken
+* ::UsernamePassword
+* ::OpenID
+* ::Certs
+* ::{Assertion,Kerberos,...}
+* ::ResetIdentity (change password for any identity once logged in / add identity)
+* ::Users::Signup
+* ::Users::Login
+* ::Users::EmailAddress
+
+::Users
+* unique ID
+* created_date, update_date, created_by, updated_by
+* display_name field (which you can force to something -- e.g. email, openid, name from cert)
+ * (Jifty::Record _brief_description returns this?)
+* last_login (?)
+* Do superuser and nobody live in the database? (That's authz)
+
+Where do identity plugins hook?
+* Add columns
+* Get credentials, return:
+ * These are valid
+ * These are invalid
+ * Other auth error ``I don't know''
+ * bounce trips go through continuations
+* load_user_by_credentials
+
+* ::Login
+* /login =>
+ * list of identity types
+ * for each, fields for login columns declared by the ::Identity::Foo plugin
+ * submit button
+* Login action
+ * load_user_by_credentials
+ * if the user doesn't exist, callback (to signup) or error
+ * Passes credentials to the identity plugin's auth method
+ * Identities that need confirmation error here if needed
+ * frob the session as appropriate
+ * frob CurrentUser
+ * Adds Dispatcher variables
+* Logout action
+ * frob the session and current user
+ * dispatcher rule on /logout redirects
+
+* ::Signup
+* Signup action
+ * verifies credentials - validates fields (inc. uniqueness)
+ * Creates a record
+ * Add a message, and push the user to the login page with a filled-out login action
+
+* What do ``mixins'' *mean*?
+ * We want injection, not actual mixins
+
+
+----- Where is this going to be hard? -----
+* Mixing columns into users
+* Getting the autogenerated actions to DTRT
+* hooks look kinda like Plagger
+* If there are multiple plugin models with no app model,
+ they all get mixed into the null model
More information about the Jifty-commit
mailing list