Good discussion. It seems to me that if we have to call a lifecycle
method related to auth for every endpoint that implements auth, the
current onAuthenticate() lifecycle method works for either case. So,
I'd keep that as it is. I like Peter's suggestion to add an
isAuthenticationRequired() helper method to make each endpoint's
onAuthenticate() method more streamlined. I'd rather do that than add
another lifecycle method related to auth.

Thanks,

Doug

On Jun 2, 12:11 pm, "Peter J. Farrell" <[email protected]> wrote:
> Sumit Verma said the following on 06/02/2011 10:52 AM:> The main confusion 
> comes from onAuthenticate() being called even when
> > I don't have authenticate="true" in the method or if I have
> > authenticate="false". So, right now onAuthenticate() method gets
> > called for each request if the onAuthenticate() method is defined
> > (<cfif endpoint.isOnAuthenticateDefined()> Line 249:
> > EndPointManager.cfc). I think it would be better to change that to
> > <cfif endpoint.isAuthenticationRequired()> (obviously
> > isAuthenticationRequired will need to be implemented).
>
> How would the EndpointManager know if authentication is required for
> that particular request?  I see you're suggestion another new endpoint
> request life cycle event of isAuthenticationRequired().  My suggestion
> was to add a helper method to the REST endpoint only.  To me it seems to
> be a lateral move to complicate the life cycle more.
>
> At this point, I'd like to solicit comments from others.  @Doug?
>
> --
> Peter J. Farrell
> [email protected]
> [email protected]http://blog.maestropublishing.com
> Identi.ca / Twitter: @maestrofjp

-- 
To post to this group, send email to [email protected]
For more options and to unsubscribe, visit this group at 
http://groups.google.com/group/mach-ii-for-coldfusion?hl=en

SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to