public void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException { // Handle authentication of scripts on a case-by-case basis. // Currently we assume that if a webscript servlet has any authenticator // applied then it must be for some kind of remote user auth as supplied. WebScript script = scriptReq.getServiceMatch().getWebScript(); script.setURLModelFactory(getUrlModelFactory()); Description desc = script.getDescription(); RequiredAuthentication required = desc.getRequiredAuthentication(); if (auth == null || RequiredAuthentication.none == required || auth.authenticate(required, false)) { script.execute(scriptReq, scriptRes); } }
public void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException { // Handle authentication of scripts on a case-by-case basis. // Currently we assume that if a webscript servlet has any authenticator // applied then it must be for some kind of remote user auth as supplied. WebScript script = scriptReq.getServiceMatch().getWebScript(); script.setURLModelFactory(getUrlModelFactory()); Description desc = script.getDescription(); RequiredAuthentication required = desc.getRequiredAuthentication(); if (auth == null || RequiredAuthentication.none == required || auth.authenticate(required, false)) { script.execute(scriptReq, scriptRes); } }
public void executeScript(WebScriptRequest scriptReq, WebScriptResponse scriptRes, Authenticator auth) throws IOException { // Handle authentication of scripts on a case-by-case basis. // Currently we assume that if a webscript servlet has any authenticator // applied then it must be for some kind of remote user auth as supplied. WebScript script = scriptReq.getServiceMatch().getWebScript(); script.setURLModelFactory(getUrlModelFactory()); Description desc = script.getDescription(); RequiredAuthentication required = desc.getRequiredAuthentication(); if (auth == null || RequiredAuthentication.none == required || auth.authenticate(required, false)) { script.execute(scriptReq, scriptRes); } }