Switching to new authz
This commit is contained in:
parent
3e1b48d645
commit
bd05ffd7b3
|
@ -182,7 +182,7 @@ public class SocialPost extends Thread {
|
|||
GXHTTPStringRequest gxhttpStringRequest = GXHTTPStringRequest.newRequest(basePath);
|
||||
gxhttpStringRequest.from(Constants.CATALOGUE_NAME);
|
||||
gxhttpStringRequest.header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
|
||||
gxhttpStringRequest.setSecurityToken(Constants.getCatalogueSecurityToken());
|
||||
gxhttpStringRequest.setSecurityToken(Constants.getCatalogueSecret().getToken());
|
||||
gxhttpStringRequest.path(SOCIAL_SERVICE_WRITE_APPLICATION_POST_PATH);
|
||||
|
||||
HttpURLConnection httpURLConnection = gxhttpStringRequest.post(objectMapper.writeValueAsString(objectNode));
|
||||
|
|
|
@ -8,8 +8,8 @@ import java.io.InputStream;
|
|||
import java.util.Properties;
|
||||
|
||||
import org.gcube.common.authorization.utils.manager.SecretManager;
|
||||
import org.gcube.common.authorization.utils.secret.GCubeSecret;
|
||||
import org.gcube.common.authorization.utils.secret.Secret;
|
||||
import org.gcube.common.authorization.utils.secret.SecretUtility;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
||||
|
@ -42,7 +42,6 @@ public class ContextTest {
|
|||
ROOT = "/gcube";
|
||||
VO = ROOT + "/devsec";
|
||||
VRE = VO + "/devVRE";
|
||||
|
||||
}
|
||||
|
||||
public static void set(Secret secret) throws Exception {
|
||||
|
@ -61,7 +60,7 @@ public class ContextTest {
|
|||
}
|
||||
|
||||
private static Secret getSecret(String token) throws Exception {
|
||||
GCubeSecret secret = new GCubeSecret(token);
|
||||
Secret secret = SecretUtility.getSecretByTokenString(token);
|
||||
return secret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue