User/Session/Auth Module

"Derick Fernando" <[email protected]>
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <002701c27639$b4749d70$0501a8c0@xenom>
I looked in jpublish/modules/user/src/org/jpublish/module/user.
Saw the Quartz module, nice to see a scheduler already there :).

As far as the User/Auth/Session Module here are my thoughts:

Are you planning on making the Database end more abstract? Like user defined
columns, tables where the user objects are stored?

Also, on the Module I've been working on, I have a Listener class which
implements HttpSessionListener. The point of which is basically so the App
can be aware of how many users are on, and how many guests are on. I find
that basic functionality missing in other frameworks, but common, in PHP,
ASP. So would that be a feature to keep?

Declarative security is already present in the Servlet API, JPublish
supports this well. So I am asuming the Auth Module is for a Programmatic
Security model, in other words all permissions are checked in application
specific code.

Will the Module rely on a <path-action path="/secure/*"
name="CheckUserRights"/> element since checking every request would be a
waste of resources.

UserManager: Has a default Manager like DBUserManager, Can be replaced in
config to allow another Manager like LDAPUserManager. Perhaps this would
also allow allow users to use their own digest algorithm for encrypting
passwords [ Your implementation looks like its headed in this direction?
:) ].

I think some of these methods would make life easier:

Auth
----------------------------
getUser(Session)
getUserPrincipal(Username)
getUserRoles(Username)
getUserPermissions(Username)
hasRole(Role)
hasPermission(Permission)

Session
----------------------------
getGuestCount()
getUserCount()
getCurrentUsers()
getCurrentGuests()

------------------------------------------------------
Table Structure:

Permissions: Permission ID, Permission Name (A List of permissions such as
"modify artcile, change username, etc)
Roles: Role name, Role ID (A list of roles)
Group: Group name, Group ID (A list of groups)
GroupRoles: Group ID, Role ID (A user in this group has this role)
GroupPermission: Group ID, Permission ID (A user in this group has this
permission)
User: UserID, LoginName, PasswordValue, FirstName, LastName, Email,
Modified, Created, LastLogin
UserRoles: UserId, RoleID (Roles user is in)
UserPermissions: UserID, PermissionID (Permissions user has)
UserGroups: UserID, GroupID (Groups user is in)

Does this sound like too much? What type of User module do we want?
I will write more later when we get into specifics :).

Thanks :),
Derick



-------------------------------------------------------
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.