Fixed code to instantiate SecretManager
This commit is contained in:
parent
b703d6605b
commit
405a65282d
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue