05-20-2009 06:46 AM
<config evaluator="string-compare" condition="Languages" replace="true">
However we still get the users to log in English..
//This function obtains calls the authentication process and once the user is aunthenticated goes to the "My Alfresco" page
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
/* Get value of parameter "userName". */
String sesionID = request.getParameter("sesionId");
//This line performs the authentication using the "autentificar" function using the login and password in the
//object Session Id
User usuario = this.getConfigurationService().autentificar(sesionID);
HttpSession session = request.getSession();
session.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, usuario);
response.sendRedirect(request.getContextPath() + FACES_SERVLET + "/jsp/dashboards/container.jsp");
}
public User autentificar(String sesionId) {
Parametros user = parametrosDAO.listParametro(sesionId,ExpedienteModel.PARAMETRO_USER);
Parametros pass = parametrosDAO.listParametro(sesionId,ExpedienteModel.PARAMETRO_PASS);
//System.out.println(user);
//System.out.println(pass);
parametrosDAO.eliminarParametros(sesionId);
try {
this.serviceRegistry.getAuthenticationService().authenticate(user.getValor(), pass.getValor().toCharArray());
// this.authenticationComponent.authenticate(user.getValor(), pass.getValor().toCharArray());
} catch (Exception e) {
System.out.println("Usuario incorrecto:"+user.getValor());
return null;
}
String currentUser = this.serviceRegistry.getAuthenticationService().getCurrentUserName();
User usuario = new User(
currentUser,
this.serviceRegistry.getAuthenticationService().getCurrentTicket(),
this.serviceRegistry.getPersonService().getPerson(currentUser));
System.out.println("Curernt user:"+currentUser);
// Get ticket
//String ticket = this.serviceRegistry.getAuthenticationService().getCurrentTicket();
// String ticket = pubAuthenticationService.getCurrentTicket();
// assertEquals("andy", ticketComponent.getAuthorityForTicket(ticket));
return usuario;
}
05-25-2009 07:49 AM
05-25-2009 10:55 AM
<config evaluator="string-compare" condition="Languages">
<!– the list of available language files –>
<languages>
<language locale="en_US">English</language>
</languages>
</config>
06-11-2009 11:06 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.