From 8ed94c0408536f90bc24cdfb7b507481b5e331bd Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Wed, 13 Mar 2024 16:00:34 +0100 Subject: [PATCH] Debug logging --- src/main/java/voot/provider/InviteProvider.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/voot/provider/InviteProvider.java b/src/main/java/voot/provider/InviteProvider.java index 0dd1dda..d8ad00a 100644 --- a/src/main/java/voot/provider/InviteProvider.java +++ b/src/main/java/voot/provider/InviteProvider.java @@ -1,9 +1,10 @@ package voot.provider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpMethod; import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; import voot.model.Group; import voot.model.Member; import voot.model.Membership; @@ -14,6 +15,8 @@ public class InviteProvider extends AbstractProvider { + private static final Logger LOG = LoggerFactory.getLogger(InviteProvider.class); + private final String groupMembershipsUrlTemplate; public InviteProvider(Configuration configuration) { @@ -26,8 +29,16 @@ public boolean shouldBeQueriedForMemberships(String schacHomeOrganization) { return true; } + @Override + public boolean isExternalGroupProvider() { + return false; + } + + @Override public Set getGroupMemberships(String uid) { + LOG.debug("Calling getGroupMemberships for " + uid); + String uri = String.format(groupMembershipsUrlTemplate, configuration.url, uid); RequestEntity>> requestEntity = new RequestEntity<>(HttpMethod.GET, URI.create(uri)); return restTemplate.exchange(requestEntity, new ParameterizedTypeReference>>() {