ChainAuthHandlerImpl maintains, for instances of type "any", an index indicating which handler in the list succeeded to authenticate the user.
This index is used in the postAuthentication method to determine which handler int he list should have its postAuthentication method invoked.
When "any" ChainAuthHandlers were nested, the index computed in the top level ChainAuthHandler was used to choose the handlers in the list of nested ChainAuthHandler.
This caused either the wrong handler to be peeked or IndexOutOfBoundsException to be thrown.
With this change, the value put in the RoutingContext is specific to a ChainAuthHandler instance.
See #2641
ChainAuthHandlerImpl maintains, for instances of type "any", an index indicating which handler in the list succeeded to authenticate the user.
This index is used in the postAuthentication method to determine which handler int he list should have its postAuthentication method invoked.
When "any" ChainAuthHandlers were nested, the index computed in the top level ChainAuthHandler was used to choose the handlers in the list of nested ChainAuthHandler.
This caused either the wrong handler to be peeked or IndexOutOfBoundsException to be thrown.
With this change, the value put in the RoutingContext is specific to a ChainAuthHandler instance.