diff --git a/oxd-server/src/main/java/org/gluu/oxd/server/op/RsProtectOperation.java b/oxd-server/src/main/java/org/gluu/oxd/server/op/RsProtectOperation.java index 4b2902ae3..d84570af2 100644 --- a/oxd-server/src/main/java/org/gluu/oxd/server/op/RsProtectOperation.java +++ b/oxd-server/src/main/java/org/gluu/oxd/server/op/RsProtectOperation.java @@ -169,9 +169,9 @@ private void validate(RsProtectParams params) { // remove existing resources, overwrite=true UmaMetadata discovery = getDiscoveryService().getUmaDiscoveryByOxdId(params.getOxdId()); String pat = getUmaTokenService().getPat(params.getOxdId()).getToken(); - + UmaResourceService resourceService = UmaClientFactory.instance().createResourceService(discovery, getHttpService().getClientEngine()); for (UmaResource resource : existingUmaResources) { - UmaResourceService resourceService = UmaClientFactory.instance().createResourceService(discovery, getHttpService().getClientEngine()); + LOG.trace("Removing existing resource " + resource.getId() + " ..."); resourceService.deleteResource("Bearer " + pat, resource.getId()); LOG.trace("Removed existing resource " + resource.getId() + ".");