From 7e567fb2473a1f4c45907b8ee90f471f94c8bec3 Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Thu, 28 Sep 2017 14:58:15 +0000 Subject: [PATCH] Fixed issue with gcube-token or gcube-scope provided as query params instead of in http header git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@154693 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resourceregistry/rest/Access.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java index 6738966..256f93f 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/rest/Access.java @@ -245,9 +245,16 @@ public class Access { Map constraint = new HashMap<>(); for(String key : multivaluedMap.keySet()){ - if(key.compareTo(AccessPath.POLYMORPHIC_PARAM)!=0){ - constraint.put(key, multivaluedMap.getFirst(key)); + if(key.compareTo(AccessPath.POLYMORPHIC_PARAM)==0){ + continue; } + if(key.compareTo("gcube-token")==0){ + continue; + } + if(key.compareTo("gcube-scope")==0){ + continue; + } + constraint.put(key, multivaluedMap.getFirst(key)); } constraint.put(AccessPath.RELATION_TYPE_PATH_PART, relationType); constraint.put(AccessPath.FACET_TYPE_PATH_PART, facetType);