[KEYCLOAK-7598] - Set CIP config when defining paths in policy enforcer config (#5264)

This commit is contained in:
Stefan Guilhen 2018-06-12 11:24:17 -03:00 committed by Pedro Igor
parent 182c975e01
commit d897159560

View file

@ -271,7 +271,17 @@ public class PolicyEnforcer {
List<ResourceRepresentation> matchingResources = authzClient.protection().resource().findByMatchingUri(targetUri); List<ResourceRepresentation> matchingResources = authzClient.protection().resource().findByMatchingUri(targetUri);
if (!matchingResources.isEmpty()) { if (!matchingResources.isEmpty()) {
Map<String, Map<String, Object>> cipConfig = null;
if (pathConfig != null) {
cipConfig = pathConfig.getClaimInformationPointConfig();
}
pathConfig = PathConfig.createPathConfig(matchingResources.get(0)); pathConfig = PathConfig.createPathConfig(matchingResources.get(0));
if (cipConfig != null) {
pathConfig.setClaimInformationPointConfig(cipConfig);
}
} }
} catch (Exception cause) { } catch (Exception cause) {
LOGGER.errorf(cause, "Could not lazy load resource with path [" + targetUri + "] from server"); LOGGER.errorf(cause, "Could not lazy load resource with path [" + targetUri + "] from server");