Signal to the container (programmatically trigger) that it should start or continue a web/HTTP based authentication dialog with
the caller.
Programmatically triggering means that the container responds as if the caller had attempted to access a constrained resource
and acts by invoking a configured authentication mechanism (such as the
HttpAuthenticationMechanism).
Whether the authentication dialog is to be started or continued depends on the (logical) state of the authentication dialog. If
such dialog is currently in progress, a call to this method will continue it. If such dialog is not in progress a new one will be
started. A new dialog can be forced to be started regardless of one being in progress or not by providing a value of
true
for the
AuthenticationParameters#newAuthentication parameter with this call.
This method requires an
HttpServletRequest and
HttpServletResponse argument to be passed in, and
can therefore only be used in a valid Servlet context.