Tidy up name handling a bit more: when setUsername() is called on a

PresentsSession, we don't need to or want to change our auth name, we can and
should operate entirely on ClientObject.username. The ClientManager maintains
two mappings: "current username" -> ClientObject (which is what needs to change
when setUsername or updateUsername is called) and "authname" -> PresentsSession
which has always been just the authname and has never changed during the course
of a session.  PresentsSession.getUsername() goes away and
PresentsSession.getAuthName() always returns the name that was used to
authenticate the session.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5838 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2009-06-23 06:20:31 +00:00
parent 0df7b9681a
commit 7efa2c74a7
3 changed files with 19 additions and 19 deletions
@@ -532,7 +532,7 @@ public class ClientManager
// remove the client from the username map
PresentsSession rc;
synchronized (_usermap) {
rc = _usermap.remove(session.getUsername());
rc = _usermap.remove(session.getAuthName());
}
// sanity check just because we can