test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java
branchhttp-client-branch
changeset 56054 352e845ae744
child 56070 66a9c3185028
equal deleted inserted replaced
56053:8588095e95b0 56054:352e845ae744
       
     1 /*
       
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     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  * @summary this test verifies that a client may provides authorization
       
    27  *          headers directly when connecting with a server, and
       
    28  *          it verifies that the client honor the jdk.http.auth.*.disabledSchemes
       
    29  *          net properties.
       
    30  * @bug 8087112
       
    31  * @library /lib/testlibrary
       
    32  * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient ProxyAuthDisabledSchemes
       
    33  * @modules jdk.incubator.httpclient
       
    34  *          java.base/sun.net.www
       
    35  *          java.base/sun.net
       
    36  * @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Basic,Digest
       
    37  *                   -Djdk.http.auth.tunneling.disabledSchemes=Digest,Basic
       
    38  *                   ProxyAuthDisabledSchemes
       
    39  * @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Basic
       
    40  *                   -Djdk.http.auth.tunneling.disabledSchemes=Basic
       
    41  *                   ProxyAuthDisabledSchemes CLEAR PROXY
       
    42  * @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Digest
       
    43  *                   -Djdk.http.auth.tunneling.disabledSchemes=Digest
       
    44  *                   ProxyAuthDisabledSchemes CLEAR PROXY
       
    45  */
       
    46 
       
    47 public class ProxyAuthDisabledSchemes {
       
    48     public static void main(String[] args) throws Exception {
       
    49         DigestEchoClient.main(args);
       
    50     }
       
    51 }