Welcome Guest, Not a member yet? Register   Sign In
Core Auth Library
#37

[eluser]jedd[/eluser]
[quote author="thody" date="1250314779"]
With all due respect, I'd love to hear of the last web-based application you signed up for that didn't require you to enter an email address. Practically speaking, it is requirement for 99% of modern web systems. [/quote]

I wrote one, actually, a few years ago. Before my CI days, but coincidentally, had I been a CI user at the time, it would have been a system that a very basic and generic auth system like this would have been perfect for. In any case, the client wanted something for the parents of kids at a particular school to be able to use, a very simple trading-post style system for equipment, books, uniforms etc. Email was specifically avoided as a prereq.

My point is, was, and will remain - a generic system should aim for coverage of 100%. It should allow for being plugged into extant auth systems (think ldap, radius, etc) where you might be caching credentials from elsewhere (and where you want to duplicate, or at least shadow, the bare minimum of fields - just enough to uniquely identify a user). I'm not suggesting that this library provide code for caching and updating credential changes to such systems (I've done some work with Novell's IDM and know that getting different auth systems to talk to each other is a huge and messy quagmire).

While 99% of modern systems doubtless do track a user's email address, I'd suggest that 99% of modern systems track a bunch of other stuff - flags for locked and/or banned, last IP address, last login time, first name, surname, appellation, creation date, and so on.

Presumably, in the predicted usage pattern for an abstracted auth library, that information is kept elsewhere.

I'm suggesting email address be kept in the same category, and/or not be assumed to exist, and/or not have any special functions created for it (as I think your current HEAD is already heading towards, or has achieved, in any case). (Digression: from a practical POV, I'd also suggest that assuming email addresses are UNIQUE within the table is a mistake - the only absolutely-must-be-unique-fields are user.id and user.handle (IMO).)

Now .. I think that this highlights a design problem we should address - how do we handle user details - do we ack they exist and provide a generic (but probably useless) interface for eg. get user_details ($field_name) and leave it to the programmer to track the fields forever using generic methods - do we assume that there'll be a user table, as per the current schema, that contains nothing but user and pass and ID (I think this is a bad assumption) - do we provide that as a base and tell the library user that they can alter it to their heart's content - do we look at using a VIEW that maps our pseudo-user table over whatever current user table(s) the system has, such that our VIEW matches our expectations, whilst not getting in the way of any pre-existing components or forcing any unwanted design decisions on the library user?

I have no experience with using VIEWs, but I gather this is an ideal use case for them - as I don't imagine anyone would want a table that contains just id/handle/password-hash, as it'd be a duplication, in part, of whatever other tables they're using to track user data. I think, but happily defer to anyone with a clue about views, that it would provide for a simpler installation & configuration process - 'here's a view statement, modify this bit here and that bit there with whatever column in whatever table refers to your user ID and handle, and then run it'.


Messages In This Thread
Core Auth Library - by El Forum - 08-12-2009, 08:53 AM
Core Auth Library - by El Forum - 08-12-2009, 10:44 AM
Core Auth Library - by El Forum - 08-12-2009, 11:00 AM
Core Auth Library - by El Forum - 08-12-2009, 11:54 AM
Core Auth Library - by El Forum - 08-12-2009, 12:05 PM
Core Auth Library - by El Forum - 08-12-2009, 12:32 PM
Core Auth Library - by El Forum - 08-12-2009, 12:45 PM
Core Auth Library - by El Forum - 08-12-2009, 12:49 PM
Core Auth Library - by El Forum - 08-12-2009, 01:04 PM
Core Auth Library - by El Forum - 08-12-2009, 01:24 PM
Core Auth Library - by El Forum - 08-12-2009, 03:07 PM
Core Auth Library - by El Forum - 08-12-2009, 05:12 PM
Core Auth Library - by El Forum - 08-12-2009, 06:01 PM
Core Auth Library - by El Forum - 08-12-2009, 06:57 PM
Core Auth Library - by El Forum - 08-12-2009, 07:41 PM
Core Auth Library - by El Forum - 08-12-2009, 08:15 PM
Core Auth Library - by El Forum - 08-13-2009, 07:25 AM
Core Auth Library - by El Forum - 08-14-2009, 02:56 AM
Core Auth Library - by El Forum - 08-14-2009, 04:56 AM
Core Auth Library - by El Forum - 08-14-2009, 08:12 AM
Core Auth Library - by El Forum - 08-14-2009, 08:18 AM
Core Auth Library - by El Forum - 08-14-2009, 08:19 AM
Core Auth Library - by El Forum - 08-14-2009, 08:29 AM
Core Auth Library - by El Forum - 08-14-2009, 08:51 AM
Core Auth Library - by El Forum - 08-14-2009, 09:02 AM
Core Auth Library - by El Forum - 08-14-2009, 09:19 AM
Core Auth Library - by El Forum - 08-14-2009, 09:33 AM
Core Auth Library - by El Forum - 08-14-2009, 11:23 AM
Core Auth Library - by El Forum - 08-14-2009, 11:49 AM
Core Auth Library - by El Forum - 08-14-2009, 12:38 PM
Core Auth Library - by El Forum - 08-14-2009, 12:56 PM
Core Auth Library - by El Forum - 08-14-2009, 01:07 PM
Core Auth Library - by El Forum - 08-14-2009, 01:10 PM
Core Auth Library - by El Forum - 08-14-2009, 02:21 PM
Core Auth Library - by El Forum - 08-14-2009, 06:39 PM
Core Auth Library - by El Forum - 08-16-2009, 01:38 AM
Core Auth Library - by El Forum - 08-16-2009, 06:02 AM
Core Auth Library - by El Forum - 08-16-2009, 09:02 AM
Core Auth Library - by El Forum - 08-16-2009, 11:18 AM
Core Auth Library - by El Forum - 08-16-2009, 01:17 PM
Core Auth Library - by El Forum - 08-16-2009, 01:37 PM
Core Auth Library - by El Forum - 08-16-2009, 03:12 PM
Core Auth Library - by El Forum - 08-16-2009, 04:03 PM
Core Auth Library - by El Forum - 08-16-2009, 06:23 PM
Core Auth Library - by El Forum - 08-16-2009, 07:01 PM
Core Auth Library - by El Forum - 08-21-2009, 01:15 AM
Core Auth Library - by El Forum - 08-21-2009, 05:06 AM
Core Auth Library - by El Forum - 08-22-2009, 07:04 AM
Core Auth Library - by El Forum - 08-22-2009, 07:45 AM
Core Auth Library - by El Forum - 08-22-2009, 04:29 PM
Core Auth Library - by El Forum - 08-22-2009, 07:12 PM
Core Auth Library - by El Forum - 08-23-2009, 05:43 AM
Core Auth Library - by El Forum - 08-24-2009, 06:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB