Short-circuit before

2013-04-29 Thread Bill Moseley
In an app we have an authenticate() method that either sets a flag that authentication was successful or throws an exception for failure to authenticate. Then we wanted to add two additional ways to authenticate. We created two new roles with before authenticate method modifiers and had each one

Re: Short-circuit before

2013-04-29 Thread Karen Etheridge
On Mon, Apr 29, 2013 at 10:45:57AM -0700, Bill Moseley wrote: What we are after is somewhat of a plugin system built with Roles where a method in each Role is called in some defined order and once successful no more are run. Anyone have a better suggestion than our before authenticate

Re: Short-circuit before

2013-04-29 Thread Chris Prather
On Mon, Apr 29, 2013 at 2:03 PM, Karen Etheridge p...@froods.org wrote: On Mon, Apr 29, 2013 at 10:45:57AM -0700, Bill Moseley wrote: What we are after is somewhat of a plugin system built with Roles where a method in each Role is called in some defined order and once successful no more

Re: Short-circuit before

2013-04-29 Thread Chris Prather
On Monday, April 29, 2013, Bill Moseley wrote: On Mon, Apr 29, 2013 at 11:18 AM, Chris Prather ch...@prather.orgjavascript:; wrote: On Mon, Apr 29, 2013 at 2:03 PM, Karen Etheridge p...@froods.orgjavascript:; wrote: Altneratively, you might find the augment/inner method