/** * Returns a String containing the name of the current authenticated user. If the user has not been authenticated, * the method returns null. * @return a String containing the name of the user making this request; null if the user has not been authenticated. */ public String getPrincipal() { HttpPrincipal principal = _exchange.getPrincipal(); return principal == null ? null : principal.getUsername(); }