volatiletech / authboss

The boss of http auth.
MIT License
3.79k stars 204 forks source link

Add ability to stop EventLoop from inside an event #337

Open larrycinnabar opened 2 years ago

larrycinnabar commented 2 years ago

What about an option to stop (Halt) event loop from inside an event? return true, nil will still loop through all registered hooks in the given event chain, and there is no option to stop and do not continue to following registered hooks

aarondl commented 9 months ago

What is the purpose behind this? The event handler signature passes in the handled bool so the decision rests in the event handlers themselves. A hard halt can prevent important event handlers from running - even those that MUST run every time (like a lock module that must know every time auth has failed).