I think they the easiest way would be to use an external authentication system and DiscourseConnect - Official Single-Sign-On for Discourse (sso). Otherwise you could do it with a plugin. Another solution (though you don’t say exactly why this is a problem) might be theme component that obscured the username.