Index: appserver/admingui/common/src/main/java/org/glassfish/admingui/common/security/AdminConsoleAuthModule.java =================================================================== --- appserver/admingui/common/src/main/java/org/glassfish/admingui/common/security/AdminConsoleAuthModule.java (revision 63128) +++ appserver/admingui/common/src/main/java/org/glassfish/admingui/common/security/AdminConsoleAuthModule.java (working copy) @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997-2014 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -68,7 +68,7 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.glassfish.jersey.client.filter.HttpBasicAuthFilter; +import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.glassfish.hk2.api.ServiceLocator; @@ -148,10 +148,10 @@ Domain domain = habitat.getService(Domain.class); NetworkListener adminListener = domain.getServerNamed("server").getConfig().getNetworkConfig().getNetworkListener("admin-listener"); SecureAdmin secureAdmin = habitat.getService(SecureAdmin.class); - + final String host = adminListener.getAddress(); // Save the REST URL we need to authenticate the user. - this.restURL = (SecureAdmin.Util.isEnabled(secureAdmin) ? "https://" : "http://") + + this.restURL = (SecureAdmin.Util.isEnabled(secureAdmin) ? "https://" : "http://") + (host.equals("0.0.0.0") ? "localhost" : host) + ":" + adminListener.getPort() + "/management/sessions"; } } @@ -240,7 +240,7 @@ Client client2 = RestUtil.initialize(ClientBuilder.newBuilder()).build(); WebTarget target = client2.target(restURL); - target.register(new HttpBasicAuthFilter(username, password)); + target.register(HttpAuthenticationFeature.basic(username, password)); MultivaluedMap payLoad = new MultivaluedHashMap(); payLoad.putSingle("remoteHostName", request.getRemoteHost()); Index: nucleus/admin/rest/rest-client/src/main/java/org/glassfish/admin/rest/client/ClientWrapper.java =================================================================== --- nucleus/admin/rest/rest-client/src/main/java/org/glassfish/admin/rest/client/ClientWrapper.java (revision 63128) +++ nucleus/admin/rest/rest-client/src/main/java/org/glassfish/admin/rest/client/ClientWrapper.java (working copy) @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2012-2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012-2014 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -57,8 +57,8 @@ import javax.net.ssl.SSLContext; import org.glassfish.jersey.client.JerseyClientBuilder; +import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.glassfish.jersey.client.filter.CsrfProtectionFilter; -import org.glassfish.jersey.client.filter.HttpBasicAuthFilter; import org.glassfish.jersey.jettison.JettisonFeature; import org.glassfish.jersey.media.multipart.MultiPartFeature; @@ -89,7 +89,7 @@ realClient.register(new JettisonFeature()); realClient.register(new CsrfProtectionFilter()); if ((userName != null) && (password != null)) { - realClient.register(new HttpBasicAuthFilter(userName, password)); + realClient.register(HttpAuthenticationFeature.basic(userName, password)); } realClient.register(new ClientRequestFilter() { Index: nucleus/admin/rest/rest-client/src/main/java/org/glassfish/admin/rest/client/RestClient.java =================================================================== --- nucleus/admin/rest/rest-client/src/main/java/org/glassfish/admin/rest/client/RestClient.java (revision 63128) +++ nucleus/admin/rest/rest-client/src/main/java/org/glassfish/admin/rest/client/RestClient.java (working copy) @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2011-2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011-2014 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -40,12 +40,12 @@ package org.glassfish.admin.rest.client; -import org.glassfish.jersey.client.filter.CsrfProtectionFilter; -import org.glassfish.jersey.client.filter.HttpBasicAuthFilter; - import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; +import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; +import org.glassfish.jersey.client.filter.CsrfProtectionFilter; + /** * * @author jasonlee @@ -72,7 +72,7 @@ client.register(new CsrfProtectionFilter()); if(user != null) { - client.register(new HttpBasicAuthFilter(user, password)); + client.register(HttpAuthenticationFeature.basic(user, password)); } } Index: nucleus/admin/rest/rest-testing/src/main/java/org/glassfish/admin/rest/testing/ResourceInvoker.java =================================================================== --- nucleus/admin/rest/rest-testing/src/main/java/org/glassfish/admin/rest/testing/ResourceInvoker.java (revision 63128) +++ nucleus/admin/rest/rest-testing/src/main/java/org/glassfish/admin/rest/testing/ResourceInvoker.java (working copy) @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013-2014 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -40,18 +40,19 @@ package org.glassfish.admin.rest.testing; -import org.codehaus.jettison.json.JSONObject; +import java.util.HashMap; +import java.util.Map; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; import javax.ws.rs.client.Invocation.Builder; import javax.ws.rs.client.WebTarget; -import javax.ws.rs.client.Entity; -import org.glassfish.jersey.client.filter.HttpBasicAuthFilter; -import java.util.HashMap; -import java.util.Map; +import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; +import org.codehaus.jettison.json.JSONObject; + public abstract class ResourceInvoker { public static final String METHOD_OPTIONS = "options"; @@ -212,7 +213,7 @@ private Builder getInvocationBuilder() throws Exception { Client client = customizeClient(ClientBuilder.newClient()); - client.register(new HttpBasicAuthFilter(getUserName(), getPassword())); + client.register(HttpAuthenticationFeature.basic(getUserName(), getPassword())); WebTarget target = client.target(getUrl()); for (Map.Entry e : getQueryParams().entrySet()) { target = target.queryParam(e.getKey(), e.getValue()); Index: nucleus/packager/nucleus-jersey/pom.xml =================================================================== --- nucleus/packager/nucleus-jersey/pom.xml (revision 63128) +++ nucleus/packager/nucleus-jersey/pom.xml (working copy) @@ -63,6 +63,10 @@ jersey-client + org.glassfish.jersey.bundles.repackaged + jersey-guava + + org.glassfish.jersey.containers jersey-container-grizzly2-http @@ -118,10 +122,6 @@ org.codehaus.jettison jettison - - com.google.guava - guava - Index: nucleus/pom.xml =================================================================== --- nucleus/pom.xml (revision 63128) +++ nucleus/pom.xml (working copy) @@ -3,7 +3,7 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - Copyright (c) 2011-2014 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2011-2014 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development @@ -61,12 +61,12 @@ scm:svn:https://svn.java.net/svn/glassfish~svn/trunk/main/nucleus https://svn.java.net/svn/glassfish~svn/trunk/main/nucleus - + IssueTracker http://java.net/jira/browse/GLASSFISH - + CDDL + GPLv2 with classpath exception @@ -74,7 +74,7 @@ repo A business-friendly OSS license - + @@ -102,7 +102,7 @@ http://java.net/projects/glassfish/lists/commits/archive - + jvnet-nexus-promoted @@ -126,7 +126,7 @@ false - + @@ -140,7 +140,7 @@ 2.5.2 javax.enterprise - + 4.0.0-b008 1.0-2 1.1-rev-1 @@ -154,10 +154,9 @@ 4.0.0-b001 4.1.2 2.7.6 - 2.5.1 + 2.6 1.9.11 1.3.3 - 14.0 2.0 1.9.4 1.0 @@ -183,7 +182,7 @@ false false - + osgi-platforms cluster @@ -201,7 +200,7 @@ resources resources-l10n - + install src/main/java @@ -214,7 +213,7 @@ **/.ade_path/** - + @@ -568,7 +567,7 @@ in package version attribute, we use the following goal to populate a project property with an OSGi version which is equivalent to maven version without qualifier and then use that - property in osgi.bundle while exporting. --> + property in osgi.bundle while exporting. --> qualifier project.osgi.version @@ -650,7 +649,7 @@ - + @@ -693,7 +692,7 @@ javax.xml.stream stax-api ${stax-api.version} - + antlr antlr @@ -747,12 +746,12 @@ org.apache.felix.eventadmin 1.2.8 - + javax.annotation javax.annotation-api ${javax.annotation-api.version} - + org.codehaus.jackson jackson-mapper-asl @@ -778,13 +777,8 @@ jettison ${jettison.version} + - com.google.guava - guava - ${guava.version} - - - org.jvnet.mimepull mimepull ${mimepull.version} @@ -1036,7 +1030,7 @@ - + default @@ -1052,7 +1046,7 @@ 1 system ${java.home}/../lib/tools.jar - + @@ -1069,7 +1063,7 @@ 1 system ${java.home}/../Classes/classes.jar - + @@ -1096,7 +1090,7 @@ ${project.version} - + @@ -1172,7 +1166,7 @@ - + junit @@ -1180,5 +1174,5 @@ test true - + Index: nucleus/tests/admin/src/test/java/org/glassfish/nucleus/admin/rest/RestTestBase.java =================================================================== --- nucleus/tests/admin/src/test/java/org/glassfish/nucleus/admin/rest/RestTestBase.java (revision 63128) +++ nucleus/tests/admin/src/test/java/org/glassfish/nucleus/admin/rest/RestTestBase.java (working copy) @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2010-2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010-2014 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -64,7 +64,8 @@ import javax.xml.parsers.DocumentBuilderFactory; import org.glassfish.admin.rest.client.ClientWrapper; import org.glassfish.admin.rest.client.utils.MarshallingUtils; -import org.glassfish.jersey.client.filter.HttpBasicAuthFilter; + +import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.glassfish.jersey.filter.LoggingFilter; import org.glassfish.jersey.media.multipart.FormDataMultiPart; import org.glassfish.jersey.media.multipart.file.FileDataBodyPart; @@ -77,7 +78,7 @@ protected static final String AUTH_USER_NAME = "dummyuser"; protected static final String AUTH_PASSWORD = "dummypass"; protected static final String CONTEXT_ROOT_MANAGEMENT = "/management"; - private static final HttpBasicAuthFilter basicAuthFilter = new HttpBasicAuthFilter(AUTH_USER_NAME, AUTH_PASSWORD); + private static final HttpAuthenticationFeature basicAuthFilter = HttpAuthenticationFeature.basic(AUTH_USER_NAME, AUTH_PASSWORD); protected static String adminHost; protected static String adminPort; protected static String adminUser;