updated for the latest modification of smartgears
This commit is contained in:
parent
25e5321e6f
commit
08ccc15f63
2
pom.xml
2
pom.xml
|
@ -14,6 +14,8 @@
|
||||||
<properties>
|
<properties>
|
||||||
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
|
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
|
||||||
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
<distroDirectory>${project.basedir}/distro</distroDirectory>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class WhnManagerImpl implements WhnManager{
|
||||||
request = request.header(entry.getKey(), entry.getValue());
|
request = request.header(entry.getKey(), entry.getValue());
|
||||||
|
|
||||||
|
|
||||||
SimpleCredentials credentials = ((DefaultAuthorizationProvider) appContext.container().configuration().authorizationProvider()).getCredentials();
|
SimpleCredentials credentials = ((DefaultAuthorizationProvider) appContext.container().authorizationProvider()).getCredentials();
|
||||||
|
|
||||||
HttpURLConnection response = request.post(String.format(" \"name\": \"ghn_client_add_to_contexts\",\n" +
|
HttpURLConnection response = request.post(String.format(" \"name\": \"ghn_client_add_to_contexts\",\n" +
|
||||||
" \"input\" : {\n" +
|
" \"input\" : {\n" +
|
||||||
|
@ -86,7 +86,7 @@ public class WhnManagerImpl implements WhnManager{
|
||||||
ValidationUtils.valid("context", context);
|
ValidationUtils.valid("context", context);
|
||||||
ApplicationContext appContext = ContextProvider.get();
|
ApplicationContext appContext = ContextProvider.get();
|
||||||
if(context!=null){
|
if(context!=null){
|
||||||
logger.trace("allowed container in context are {} ",appContext.container().configuration().authorizationProvider().getContexts());
|
logger.trace("allowed container in context are {} ",appContext.container().authorizationProvider().getContexts());
|
||||||
|
|
||||||
GXHTTPStringRequest request = GXHTTPStringRequest.newRequest("https://conductor.dev.d4science.org/api");
|
GXHTTPStringRequest request = GXHTTPStringRequest.newRequest("https://conductor.dev.d4science.org/api");
|
||||||
try {
|
try {
|
||||||
|
@ -96,7 +96,7 @@ public class WhnManagerImpl implements WhnManager{
|
||||||
request = request.header(entry.getKey(), entry.getValue());
|
request = request.header(entry.getKey(), entry.getValue());
|
||||||
|
|
||||||
|
|
||||||
SimpleCredentials credentials = ((DefaultAuthorizationProvider) appContext.container().configuration().authorizationProvider()).getCredentials();
|
SimpleCredentials credentials = ((DefaultAuthorizationProvider) appContext.container().authorizationProvider()).getCredentials();
|
||||||
|
|
||||||
HttpURLConnection response = request.post(String.format(" \"name\": \"ghn_client_remove_from_contexts\",\n" +
|
HttpURLConnection response = request.post(String.format(" \"name\": \"ghn_client_remove_from_contexts\",\n" +
|
||||||
" \"input\" : {\n" +
|
" \"input\" : {\n" +
|
||||||
|
|
Loading…
Reference in New Issue