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
check a flag if authentication was successful (in a previous "before") to
decide to continue checking or not.   Now we have more methods we wish to
add.

It's feeling a bit hackish at this point.

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" approach?

Thanks,

-- 
Bill Moseley
mose...@hank.org

Reply via email to