@GET @Path("authenticate") @Produces(MediaType.APPLICATION_JSON) public List<AuthorizationNode> getAuthentication(@QueryParam("participantAddress") String participantAddress) { AuthorizationInfo authorizationInfo; try { authorizationInfo = getAccountabilityManager() .getAuthorization(provenanceId) .exceptionally(error -> null) .get(); } catch (InterruptedException | ExecutionException | AccountabilityException e) { LOGGER.error("Cannot authenticate participant {}. Reason: {}", participantAddress, e.getMessage()); throw createException(e); } if (Objects.nonNull(authorizationInfo)) { return authorizationInfo .getAuthorizationLineage(participantAddress) .orElseGet(ArrayList::new); } return new ArrayList<>(); }