String seconds = requestForm.getFirstValue("expiration");
long requestExpiration = seconds==null ? expiration : Long.parseLong(seconds)*1000;
if ("false".equals(requestForm.getFirstValue("session"))) {
requestExpiration = 0;
}
User.Authenticated authd = user.authenticate(realm,password,requestExpiration);
if (authd!=null) {
String userAlias = authd.getUser().getAlias();
UUID userId = authd.getUser().getUUID();
String name = authd.getUser().getName();
String email = authd.getUser().getEmail();