Remove LoggedInFlow

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137444791
This commit is contained in:
cgoldfeder 2016-10-27 14:52:50 -07:00 committed by Ben McIlwain
parent 8b068250d6
commit b84d7f1fb5
50 changed files with 763 additions and 429 deletions

View file

@ -27,6 +27,7 @@ import google.registry.flows.EppException.ParameterValuePolicyErrorException;
import google.registry.flows.EppException.UnimplementedExtensionException;
import google.registry.flows.EppException.UnimplementedObjectServiceException;
import google.registry.flows.EppException.UnimplementedOptionException;
import google.registry.flows.ExtensionManager;
import google.registry.flows.Flow;
import google.registry.flows.FlowModule.ClientId;
import google.registry.model.eppcommon.ProtocolDefinition;
@ -68,6 +69,7 @@ public class LoginFlow extends Flow {
/** Maximum number of failed login attempts allowed per connection. */
private static final int MAX_FAILED_LOGIN_ATTEMPTS_PER_CONNECTION = 3;
@Inject ExtensionManager extensionManager;
@Inject @ClientId String clientId;
@Inject LoginFlow() {}
@ -84,6 +86,7 @@ public class LoginFlow extends Flow {
/** Run the flow without bothering to log errors. The {@link #run} method will do that for us. */
public final EppOutput runWithoutLogging() throws EppException {
extensionManager.validate(); // There are no legal extensions for this flow.
Login login = (Login) eppInput.getCommandWrapper().getCommand();
if (!clientId.isEmpty()) {
throw new AlreadyLoggedInException();