private void sendAuthResponse ( HttpServletResponse response ) throws IOException { response . setHeader ( "WWW-Authenticate" , String . format ( "Basic realm=\"%1$s\"" , realm ) ) ; //$NON-NLS-1$ //$NON-NLS-2$ response . sendError ( HttpServletResponse . SC_UNAUTHORIZED ) ; }
Sends a response that tells the client that authentication is required .