Skip to content

Commit

Permalink
Debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Mar 13, 2024
1 parent 8b04aaf commit 8ed94c0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/voot/provider/InviteProvider.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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) {
Expand All @@ -26,8 +29,16 @@ public boolean shouldBeQueriedForMemberships(String schacHomeOrganization) {
return true;
}

@Override
public boolean isExternalGroupProvider() {
return false;
}


@Override
public Set<Group> getGroupMemberships(String uid) {
LOG.debug("Calling getGroupMemberships for " + uid);

String uri = String.format(groupMembershipsUrlTemplate, configuration.url, uid);
RequestEntity<List<Map<String, String>>> requestEntity = new RequestEntity<>(HttpMethod.GET, URI.create(uri));
return restTemplate.exchange(requestEntity, new ParameterizedTypeReference<List<Map<String, String>>>() {
Expand Down

0 comments on commit 8ed94c0

Please sign in to comment.