code: public void handle(RequestContext context, AuthenticationException e) throws SecurityProviderException,
              IOException {
          saveRequest(context);
  
          String loginFormUrl = getLoginFormUrl();
  
          if (StringUtils.isNotEmpty(loginFormUrl)) {
              RedirectUtils.redirect(context.getRequest(), context.getResponse(), loginFormUrl);
          } else {
              sendError(e, context);
          }
      }
docs: Saves the current request in the request cache and then redirects to the login form page.
  
  @param context the request security context
  @param e       the exception with the reason for requiring authentication