John Hampton wrote:
> Ok, it's late, so please go easy on me.
>
> I've been looking into the IAuthenticator[1][2] interface.  It's used to
> "authenticate" the user.  Basically it checks if the REMOTE_USER env
> variable is set or if the trac_auth cookie is set.  Not horribly
> complicated.  

> Now, I'm working on merging the account manager plugin
> into core[3] (most everything except registration and email verification)
>   
It would be interesting to know what's your approach for that. Do you 
plan to "merge" the AccountManager stuff into existing files or modules 
in Trac core, or to keep its current structure and have it like as an 
(optional) component?

Most importantly, is the BEER-WARE license used by the account manager 
compatible for inclusion in Trac core? ;-)

> As I'm digging into this, I'm questioning the way in which we use the
> IAuthenticate interface.
>
> First, AFAICT, we're only calling the authenticate() method on perm
> requests and requests for the authname (req.perm and req.authname).
> This seems kind of stupid to me.  Seems to me that we should be calling
> authenticate once for each request.
>
> Fortunately, due to the lazy evaluation code of the request[4], we
> aren't constantly calling the authenticate() function.  However, we
> generally make the call twice for every request (once for use of
> req.authname[5], once for use of req.perm[6]).
>
> Seems to me that it's better to simply call the authenticate method
> explicitly at the beginning of every request and simply set req.authname.
>   

I suppose the code could certainly be enhanced so that authenticate() 
gets called only once, either by the authname or by the perm callbacks, 
but not by both (should be as simple as using req.authname in 
RequestDispatcher._get_perm).

But we don't want to authenticate every requests because of the Chrome 
component which can serve static content from htdocs. For those, we want 
as little overhead as possible.

-- Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to