porting to changes in gcube-security
This commit is contained in:
parent
ac94d42dd8
commit
db11acc925
|
@ -82,7 +82,7 @@ public class EServiceManager {
|
|||
}
|
||||
|
||||
public void addEServiceToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
Secret secret = SecretManagerProvider.instance.get();
|
||||
Secret secret = SecretManagerProvider.get();
|
||||
String context = secret.getContext();
|
||||
UUID contextUUID = ContextUtility.getContextUUID(context);
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class EServiceManager {
|
|||
for (String c : contexts) {
|
||||
if(c.compareTo(context)!=0) {
|
||||
Secret s = authorizationProvider.getSecretForContext(c);
|
||||
SecretManagerProvider.instance.set(s);
|
||||
SecretManagerProvider.set(s);
|
||||
anotherContextSet = true;
|
||||
break;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class EServiceManager {
|
|||
|
||||
|
||||
public void addHostingNodeToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
Secret secret = SecretManagerProvider.instance.get();
|
||||
Secret secret = SecretManagerProvider.get();
|
||||
String context = secret.getContext();
|
||||
UUID contextUUID = ContextUtility.getContextUUID(context);
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class EServiceManager {
|
|||
for (String c : contexts) {
|
||||
if(c.compareTo(context)!=0) {
|
||||
Secret s = authorizationProvider.getSecretForContext(c);
|
||||
SecretManagerProvider.instance.set(s);
|
||||
SecretManagerProvider.set(s);
|
||||
anotherContextSet = true;
|
||||
break;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public class EServiceManager {
|
|||
|
||||
public void removeFromCurrentContext()
|
||||
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
Secret secret = SecretManagerProvider.instance.get();
|
||||
Secret secret = SecretManagerProvider.get();
|
||||
String context = secret.getContext();
|
||||
UUID uuid = UUID.fromString(applicationContext.container().id());
|
||||
try {
|
||||
|
|
|
@ -114,7 +114,7 @@ public class HostingNodeManager {
|
|||
}
|
||||
|
||||
public void addToCurrentContext() throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
Secret secret = SecretManagerProvider.instance.get();
|
||||
Secret secret = SecretManagerProvider.get();
|
||||
String context = secret.getContext();
|
||||
UUID contextUUID = ContextUtility.getContextUUID(context);
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class HostingNodeManager {
|
|||
for (String c : contexts) {
|
||||
if(c.compareTo(context)!=0) {
|
||||
Secret s = authorizationProvider.getSecretForContext(c);
|
||||
SecretManagerProvider.instance.set(s);
|
||||
SecretManagerProvider.set(s);
|
||||
anotherContextSet = true;
|
||||
break;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ public class HostingNodeManager {
|
|||
|
||||
public void removeFromCurrentContext()
|
||||
throws ResourceNotFoundException, ContextNotFoundException, ResourceRegistryException {
|
||||
Secret secret = SecretManagerProvider.instance.get();
|
||||
Secret secret = SecretManagerProvider.get();
|
||||
String context = secret.getContext();
|
||||
UUID uuid = UUID.fromString(containerContext.id());
|
||||
try {
|
||||
|
|
|
@ -57,8 +57,8 @@ public class ContextTest {
|
|||
}
|
||||
|
||||
public static void set(Secret secret) throws Exception {
|
||||
SecretManagerProvider.instance.reset();
|
||||
SecretManagerProvider.instance.set(secret);
|
||||
SecretManagerProvider.reset();
|
||||
SecretManagerProvider.set(secret);
|
||||
}
|
||||
|
||||
public static void setContextByName(String fullContextName) throws Exception {
|
||||
|
@ -79,7 +79,7 @@ public class ContextTest {
|
|||
|
||||
@AfterClass
|
||||
public static void afterClass() throws Exception {
|
||||
SecretManagerProvider.instance.reset();
|
||||
SecretManagerProvider.reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue