// user predicates String getUsername() { Principal user = req.getUserPrincipal(); return user != null ? user.toString() : null; }