Make the auth response data available to interested parties.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2713 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Client.java,v 1.38 2003/05/20 19:07:52 mdb Exp $
|
// $Id: Client.java,v 1.39 2003/07/17 21:39:15 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@ import com.samskivert.util.ResultListener;
|
|||||||
import com.threerings.presents.Log;
|
import com.threerings.presents.Log;
|
||||||
import com.threerings.presents.data.ClientObject;
|
import com.threerings.presents.data.ClientObject;
|
||||||
import com.threerings.presents.dobj.DObjectManager;
|
import com.threerings.presents.dobj.DObjectManager;
|
||||||
|
import com.threerings.presents.net.AuthResponseData;
|
||||||
import com.threerings.presents.net.BootstrapData;
|
import com.threerings.presents.net.BootstrapData;
|
||||||
import com.threerings.presents.net.Credentials;
|
import com.threerings.presents.net.Credentials;
|
||||||
import com.threerings.presents.net.PingRequest;
|
import com.threerings.presents.net.PingRequest;
|
||||||
@@ -170,6 +171,17 @@ public class Client
|
|||||||
_version = version;
|
_version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the data associated with our authentication response. Users
|
||||||
|
* of the Presents system may wish to communicate authentication
|
||||||
|
* related information to their client by extending and augmenting
|
||||||
|
* {@link AuthResponseData}.
|
||||||
|
*/
|
||||||
|
public AuthResponseData getAuthResponseData ()
|
||||||
|
{
|
||||||
|
return _authData;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the distributed object manager associated with this
|
* Returns the distributed object manager associated with this
|
||||||
* session. This reference is only valid for the duration of the
|
* session. This reference is only valid for the duration of the
|
||||||
@@ -589,6 +601,9 @@ public class Client
|
|||||||
* client thread (which is also the AWT thread). */
|
* client thread (which is also the AWT thread). */
|
||||||
protected Invoker _invoker;
|
protected Invoker _invoker;
|
||||||
|
|
||||||
|
/** The data associated with our authentication response. */
|
||||||
|
protected AuthResponseData _authData;
|
||||||
|
|
||||||
/** Our client distribted object id. */
|
/** Our client distribted object id. */
|
||||||
protected int _cloid = -1;
|
protected int _cloid = -1;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Communicator.java,v 1.31 2003/06/05 00:33:43 ray Exp $
|
// $Id: Communicator.java,v 1.32 2003/07/17 21:39:15 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -181,6 +181,10 @@ public class Communicator
|
|||||||
_writer = new Writer();
|
_writer = new Writer();
|
||||||
_writer.start();
|
_writer.start();
|
||||||
|
|
||||||
|
// fill the auth data into the client's local field so that it can
|
||||||
|
// be requested by external entities
|
||||||
|
_client._authData = data;
|
||||||
|
|
||||||
// wait for the bootstrap notification before we claim that we're
|
// wait for the bootstrap notification before we claim that we're
|
||||||
// actually logged on
|
// actually logged on
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user