From 0ab8e327cfaefff25bb7f9a4e30d25a8719f48ae Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Mon, 22 Feb 2021 10:09:11 +0100 Subject: [PATCH] Update 'src/main/java/org/gcube/smartgears/handlers/application/request/RequestValidator.java' removed call redirect when not authorized --- .../handlers/application/request/RequestValidator.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/gcube/smartgears/handlers/application/request/RequestValidator.java b/src/main/java/org/gcube/smartgears/handlers/application/request/RequestValidator.java index 97d6955..4ba8831 100644 --- a/src/main/java/org/gcube/smartgears/handlers/application/request/RequestValidator.java +++ b/src/main/java/org/gcube/smartgears/handlers/application/request/RequestValidator.java @@ -98,10 +98,9 @@ public class RequestValidator extends RequestHandler { if (token == null && scope==null){ log.warn("rejecting call to {}, authorization required",context.name(),token); - if (call.context().container().configuration().authenticationEnpoint()==null){ - log.warn("rejecting call to {}, authorization required",context.name(),token); - RequestError.request_not_authorized_error.fire(context.name()+": authorization required"); - }else { + //if (call.context().container().configuration().authenticationEnpoint()==null){ + RequestError.request_not_authorized_error.fire(context.name()+": authorization required"); + /*}else { log.info("authorization enpoint found on configuration, redirecting the call"); String recallLocation = String.format("http://%s:%d%s", call.context().container().configuration().hostname(), call.context().container().configuration().port(), call.uri()); //call.response().setHeader("Allowed-Contexts", call.context().container().configuration().allowedContexts().toString()); @@ -110,7 +109,7 @@ public class RequestValidator extends RequestHandler { } catch (IOException e) { log.error("errror redirecting call",e ); } - } + }*/ } }