|
|
|
@ -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 );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|