< prev index next >

test/sun/security/krb5/auto/HttpNegotiateServer.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6578647 6829283









  27  * @run main/othervm HttpNegotiateServer
  28  * @summary Undefined requesting URL in java.net.Authenticator.getPasswordAuthentication()
  29  * @summary HTTP/Negotiate: Authenticator triggered again when user cancels the first one
  30  */
  31 
  32 import com.sun.net.httpserver.Headers;
  33 import com.sun.net.httpserver.HttpContext;
  34 import com.sun.net.httpserver.HttpExchange;
  35 import com.sun.net.httpserver.HttpHandler;
  36 import com.sun.net.httpserver.HttpServer;
  37 import com.sun.net.httpserver.HttpPrincipal;
  38 import com.sun.security.auth.module.Krb5LoginModule;
  39 import java.io.BufferedReader;
  40 import java.io.File;
  41 import java.io.FileOutputStream;
  42 import java.io.IOException;
  43 import java.io.InputStream;
  44 import java.io.InputStreamReader;
  45 import java.net.HttpURLConnection;
  46 import java.net.InetSocketAddress;




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6578647 6829283
  27  * @modules java.base/sun.net.spi.nameservice
  28  *          java.base/sun.security.util
  29  *          java.base/sun.util.logging
  30  *          java.security.jgss/sun.security.jgss
  31  *          java.security.jgss/sun.security.krb5
  32  *          java.security.jgss/sun.security.krb5.internal
  33  *          java.security.jgss/sun.security.krb5.internal.ccache
  34  *          java.security.jgss/sun.security.krb5.internal.crypto
  35  *          java.security.jgss/sun.security.krb5.internal.ktab
  36  * @run main/othervm HttpNegotiateServer
  37  * @summary Undefined requesting URL in java.net.Authenticator.getPasswordAuthentication()
  38  * @summary HTTP/Negotiate: Authenticator triggered again when user cancels the first one
  39  */
  40 
  41 import com.sun.net.httpserver.Headers;
  42 import com.sun.net.httpserver.HttpContext;
  43 import com.sun.net.httpserver.HttpExchange;
  44 import com.sun.net.httpserver.HttpHandler;
  45 import com.sun.net.httpserver.HttpServer;
  46 import com.sun.net.httpserver.HttpPrincipal;
  47 import com.sun.security.auth.module.Krb5LoginModule;
  48 import java.io.BufferedReader;
  49 import java.io.File;
  50 import java.io.FileOutputStream;
  51 import java.io.IOException;
  52 import java.io.InputStream;
  53 import java.io.InputStreamReader;
  54 import java.net.HttpURLConnection;
  55 import java.net.InetSocketAddress;


< prev index next >