We don't even need this check. Simplify simplify simplify.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4656 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -64,7 +64,7 @@ public abstract class Authenticator
|
|||||||
final AuthResponseData rdata = createResponseData();
|
final AuthResponseData rdata = createResponseData();
|
||||||
final AuthResponse rsp = new AuthResponse(rdata);
|
final AuthResponse rsp = new AuthResponse(rdata);
|
||||||
|
|
||||||
Invoker.Unit unit = new Invoker.Unit("auth:" + req.getCredentials()) {
|
getInvoker().postUnit(new Invoker.Unit("auth:" + req.getCredentials()) {
|
||||||
public boolean invoke() {
|
public boolean invoke() {
|
||||||
try {
|
try {
|
||||||
processAuthentication(conn, rsp);
|
processAuthentication(conn, rsp);
|
||||||
@@ -89,21 +89,12 @@ public abstract class Authenticator
|
|||||||
_conmgr.connectionDidAuthenticate(conn);
|
_conmgr.connectionDidAuthenticate(conn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
Invoker invoker = getInvoker();
|
|
||||||
if (invoker == null) {
|
|
||||||
log.warning("Received authentication request before server initialization completed! " +
|
|
||||||
"Authenticator has no invoker. [req=" + req + "].");
|
|
||||||
} else {
|
|
||||||
invoker.postUnit(unit);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the invoker on which to process the authentication, or null if the authentication
|
* Return the invoker on which to process the authentication. The default implementation
|
||||||
* should occur on the calling thread. The default implementation returns
|
* returns PresentsServer.invoker.
|
||||||
* PresentsServer.invoker.
|
|
||||||
*/
|
*/
|
||||||
protected Invoker getInvoker ()
|
protected Invoker getInvoker ()
|
||||||
{
|
{
|
||||||
@@ -124,7 +115,7 @@ public abstract class Authenticator
|
|||||||
*
|
*
|
||||||
* @param conn The client connection.
|
* @param conn The client connection.
|
||||||
* @param rsp The response to the client, which will already contain an AuthResponseData
|
* @param rsp The response to the client, which will already contain an AuthResponseData
|
||||||
* created by createResponseDatA().
|
* created by {@link #createResponseData}.
|
||||||
*/
|
*/
|
||||||
protected abstract void processAuthentication (AuthingConnection conn, AuthResponse rsp)
|
protected abstract void processAuthentication (AuthingConnection conn, AuthResponse rsp)
|
||||||
throws PersistenceException;
|
throws PersistenceException;
|
||||||
|
|||||||
Reference in New Issue
Block a user