Fixed code to instantiate SecretManager

This commit is contained in:
Luca Frosini 2022-02-28 13:26:40 +01:00
parent b703d6605b
commit 405a65282d
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import java.util.Base64;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import org.gcube.common.authorization.utils.manager.SecretManager; import org.gcube.common.authorization.utils.manager.SecretManager;
import org.gcube.common.authorization.utils.manager.SecretManagerProvider;
import org.gcube.common.authorization.utils.secret.GCubeSecret; import org.gcube.common.authorization.utils.secret.GCubeSecret;
import org.gcube.common.authorization.utils.secret.JWTSecret; import org.gcube.common.authorization.utils.secret.JWTSecret;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
@ -58,7 +59,7 @@ public class RequestContextRetriever extends RequestHandler {
} }
} }
SecretManager secretManager = SecretManager.instance.get(); SecretManager secretManager = SecretManagerProvider.instance.get();
if (accessToken!=null) { if (accessToken!=null) {
JWTSecret jwtSecret = new JWTSecret(accessToken); JWTSecret jwtSecret = new JWTSecret(accessToken);
@ -94,7 +95,7 @@ public class RequestContextRetriever extends RequestHandler {
@Override @Override
public void handleResponse(ResponseEvent e) { public void handleResponse(ResponseEvent e) {
log.debug("resetting all the Thread local for this call."); log.debug("resetting all the Thread local for this call.");
SecretManager.instance.get().reset(); SecretManagerProvider.instance.get().reset();
} }
} }