String name = req.getParameter("userName");
String password = req.getParameter("password");
String authType = req.getParameter("authType");
ServerManager serverManager = ServerManager.getServerManager();
if (authType != null) {
String authName = serverManager.getDavinciProperty("orion.auth.name");
if (authName == null) {
authName = "mixloginstatic";
}
this.responseString = authName;
} else {
try {
IUserManager userManager = serverManager.getUserManager();
user = userManager.login(name, password);
if (user != null) {
String redirect = (String) req.getSession().getAttribute(IDavinciServerConstants.REDIRECT_TO);
req.getSession().removeAttribute(IDavinciServerConstants.REDIRECT_TO); // burn after reading
this.responseString = (redirect != null) ? redirect : "OK";