The {@code AuthenticationFilter} enforces if authentication is required before allowing the broker filter chainto continue.
This implementation performs a connection-level authentication assertion: If the {@link Subject} associated with theconnection
* is not authenticated, and the {@link AuthenticationPolicy AuthenticationPolicy} requires the {@code Subject} to be authenticated, it will attemptto {@link Subject#login(org.apache.shiro.authc.AuthenticationToken) login} the Subject automatically. The{@link AuthenticationToken} used to login is created by the{@link #getAuthenticationTokenFactory() authenticationTokenFactory}, typically by acquiring any credentials associated with the connection.
Once the connection's {@code Subject} is authenticated as necessary, the broker filter chain will continueas expected.
*: The upstream {@link org.apache.activemq.shiro.subject.SubjectFilter} is expected to execute before this one, ensuring a Subject instanceis already associated with the connection.
@since 5.10.0