use of net.geoprism.SessionEvent in project geoprism-registry by terraframe.
the class RegistrySessionController method loginWithLocales.
public ClientRequestIF loginWithLocales(ServletRequestIF req, String username, String password, Locale[] locales) {
try {
WebClientSession clientSession = WebClientSession.createUserSession(username, password, locales);
ClientRequestIF clientRequest = clientSession.getRequest();
req.getSession().setMaxInactiveInterval(CommonProperties.getSessionTime());
req.getSession().setAttribute(ClientConstants.CLIENTSESSION, clientSession);
req.setAttribute(ClientConstants.CLIENTREQUEST, clientRequest);
ClientConfigurationService.handleSessionEvent(new SessionEvent(EventType.LOGIN_SUCCESS, clientRequest, username));
return clientRequest;
} catch (RuntimeException e) {
ClientConfigurationService.handleSessionEvent(new SessionEvent(EventType.LOGIN_FAILURE, null, username));
throw e;
}
}
Aggregations