mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Flatten the domain and application create flows
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136601151
This commit is contained in:
parent
43821f650e
commit
475203532e
31 changed files with 1151 additions and 1410 deletions
|
@ -28,6 +28,7 @@ import google.registry.flows.EppException.UnimplementedExtensionException;
|
|||
import google.registry.flows.EppException.UnimplementedObjectServiceException;
|
||||
import google.registry.flows.EppException.UnimplementedOptionException;
|
||||
import google.registry.flows.Flow;
|
||||
import google.registry.flows.FlowModule.ClientId;
|
||||
import google.registry.model.eppcommon.ProtocolDefinition;
|
||||
import google.registry.model.eppcommon.ProtocolDefinition.ServiceExtension;
|
||||
import google.registry.model.eppinput.EppInput.Login;
|
||||
|
@ -67,6 +68,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 @ClientId String clientId;
|
||||
@Inject LoginFlow() {}
|
||||
|
||||
/** Run the flow and log errors. */
|
||||
|
@ -83,7 +85,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 {
|
||||
Login login = (Login) eppInput.getCommandWrapper().getCommand();
|
||||
if (getClientId() != null) {
|
||||
if (!clientId.isEmpty()) {
|
||||
throw new AlreadyLoggedInException();
|
||||
}
|
||||
Options options = login.getOptions();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue