I'd agree with you in most circumstances (inheritance) - in this instance I
broke the advice never to touch the core

The key point is not to write an LdapAuth or WhateverAuth, the objective was
to create a few lines in Auth that allows you to call an external method to
do whatever validation you like (not just ldap, could be anything) (I think
Nate hinted at this earlier in the thread) My few lines of change were
allowed me to do exactly that, in the same style of other parts of Auth.
Provides extra functionality, and stays backward compatible. Allows the core
to delegate responsibility elsewhere, to the developer, seamlessly and in a
generic way not tied to any particular implementation.

As I said originally I was going to add to or launch a new trac ticket with
the possible fix once I'd established what it was and tested it.


On Wed, Apr 30, 2008 at 7:49 PM, Marcin Domanski <[EMAIL PROTECTED]> wrote:

>
> Hey
>
> On Wed, Apr 30, 2008 at 3:49 PM, Aitch <[EMAIL PROTECTED]> wrote:
> >
> >  Folks, this *can* be done if you dig deep enough. I know it is bad
> >  karma to modify the source, but I've done it - to add LDAP
> >  authentication capability to Auth. I even have the diffs against
> >  6311 :-) The trick is to look at the identify() method in auth.php.
> >  Essentially the hard coded call to find needs to be replaced with an
> >  if/else in two places - only 4 extra lines of "real" code, I was very
> >  careful to use what is provided and completely minimise the hack.
> Wouldn't it be better to create a LdapAuth component that would
> inherit from Auth component instead of editing the core ?
>
>
>
> --
> Marcin Domanski
> http://kabturek.info
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to