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
This commit is contained in:
Luca Frosini 2017-09-28 14:58:15 +00:00
parent 7c46d4dcfb
commit 7e567fb247
1 changed files with 9 additions and 2 deletions

View File

@ -245,9 +245,16 @@ public class Access {
Map<String, String> constraint = new HashMap<>(); Map<String, String> constraint = new HashMap<>();
for(String key : multivaluedMap.keySet()){ for(String key : multivaluedMap.keySet()){
if(key.compareTo(AccessPath.POLYMORPHIC_PARAM)!=0){ if(key.compareTo(AccessPath.POLYMORPHIC_PARAM)==0){
constraint.put(key, multivaluedMap.getFirst(key)); 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.RELATION_TYPE_PATH_PART, relationType);
constraint.put(AccessPath.FACET_TYPE_PATH_PART, facetType); constraint.put(AccessPath.FACET_TYPE_PATH_PART, facetType);