mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Fix some style issues that will help us out later
These files will have errors later when we run the Google Java Format plugin over their entirety (e.g. a situation where fixed indentation leads to a line that's longer than 100 characters). It's simpler to fix them now so we won't have to fix them later. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=232353791
This commit is contained in:
parent
a325f0a50b
commit
058ef07e16
5 changed files with 28 additions and 27 deletions
|
@ -158,22 +158,22 @@ public class RequestAuthenticator {
|
||||||
private AuthResult authenticate(AuthSettings auth, HttpServletRequest req) {
|
private AuthResult authenticate(AuthSettings auth, HttpServletRequest req) {
|
||||||
checkAuthConfig(auth);
|
checkAuthConfig(auth);
|
||||||
for (AuthMethod authMethod : auth.methods()) {
|
for (AuthMethod authMethod : auth.methods()) {
|
||||||
|
AuthResult authResult;
|
||||||
switch (authMethod) {
|
switch (authMethod) {
|
||||||
// App Engine internal authentication, using the queue name header
|
// App Engine internal authentication, using the queue name header
|
||||||
case INTERNAL: {
|
case INTERNAL:
|
||||||
// checkAuthConfig will have insured that the user policy is not USER.
|
// checkAuthConfig will have insured that the user policy is not USER.
|
||||||
AuthResult authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
|
authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
|
||||||
if (authResult.isAuthenticated()) {
|
if (authResult.isAuthenticated()) {
|
||||||
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
|
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
|
||||||
return authResult;
|
return authResult;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// API-based user authentication mechanisms, such as OAuth
|
// API-based user authentication mechanisms, such as OAuth
|
||||||
case API:
|
case API:
|
||||||
// checkAuthConfig will have insured that the user policy is not IGNORED.
|
// checkAuthConfig will have insured that the user policy is not IGNORED.
|
||||||
for (AuthenticationMechanism authMechanism : apiAuthenticationMechanisms) {
|
for (AuthenticationMechanism authMechanism : apiAuthenticationMechanisms) {
|
||||||
AuthResult authResult = authMechanism.authenticate(req);
|
authResult = authMechanism.authenticate(req);
|
||||||
if (authResult.isAuthenticated()) {
|
if (authResult.isAuthenticated()) {
|
||||||
logger.atInfo().log(
|
logger.atInfo().log(
|
||||||
"Authenticated via %s: %s", authMechanism.getClass().getSimpleName(), authResult);
|
"Authenticated via %s: %s", authMechanism.getClass().getSimpleName(), authResult);
|
||||||
|
@ -184,7 +184,7 @@ public class RequestAuthenticator {
|
||||||
// Legacy authentication via UserService
|
// Legacy authentication via UserService
|
||||||
case LEGACY:
|
case LEGACY:
|
||||||
// checkAuthConfig will have insured that the user policy is not IGNORED.
|
// checkAuthConfig will have insured that the user policy is not IGNORED.
|
||||||
AuthResult authResult = legacyAuthenticationMechanism.authenticate(req);
|
authResult = legacyAuthenticationMechanism.authenticate(req);
|
||||||
if (authResult.isAuthenticated()) {
|
if (authResult.isAuthenticated()) {
|
||||||
logger.atInfo().log("Authenticated via legacy auth: %s", authResult);
|
logger.atInfo().log("Authenticated via legacy auth: %s", authResult);
|
||||||
return authResult;
|
return authResult;
|
||||||
|
|
|
@ -183,15 +183,14 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Parameter(
|
@Parameter(
|
||||||
names = "--billing_account_map",
|
names = "--billing_account_map",
|
||||||
description =
|
description =
|
||||||
"Registrar Billing Account key-value pairs (formatted as key=value[,key=value...]), "
|
"Registrar Billing Account key-value pairs (formatted as key=value[,key=value...]), "
|
||||||
+ "where key is a currency unit (USD, JPY, etc) and value is the registrar's billing "
|
+ "where key is a currency unit (USD, JPY, etc) and value is the registrar's billing "
|
||||||
+ "account id for that currency. During update, only the pairs that need updating need "
|
+ "account id for that currency. During update, only the pairs that need updating "
|
||||||
+ "to be provided.",
|
+ "need to be provided.",
|
||||||
converter = CurrencyUnitToStringMap.class,
|
converter = CurrencyUnitToStringMap.class,
|
||||||
validateWith = CurrencyUnitToStringMap.class
|
validateWith = CurrencyUnitToStringMap.class)
|
||||||
)
|
|
||||||
private Map<CurrencyUnit, String> billingAccountMap;
|
private Map<CurrencyUnit, String> billingAccountMap;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -307,8 +307,9 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
|
||||||
if (renewBillingCostTransitions.size() > 1) {
|
if (renewBillingCostTransitions.size() > 1) {
|
||||||
System.err.println(
|
System.err.println(
|
||||||
"----------------------\n"
|
"----------------------\n"
|
||||||
+ "WARNING: Do not set multiple renew cost transitions until b/20764952 is fixed.\n"
|
+ "WARNING: Do not set multiple renew cost transitions "
|
||||||
+ "----------------------\n");
|
+ "until b/20764952 is fixed.\n"
|
||||||
|
+ "----------------------\n");
|
||||||
}
|
}
|
||||||
builder.setRenewBillingCostTransitions(renewBillingCostTransitions);
|
builder.setRenewBillingCostTransitions(renewBillingCostTransitions);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,10 @@ import javax.inject.Named;
|
||||||
|
|
||||||
/** Command to generate and persist {@link AllocationToken}s. */
|
/** Command to generate and persist {@link AllocationToken}s. */
|
||||||
@Parameters(
|
@Parameters(
|
||||||
separators = " =",
|
separators = " =",
|
||||||
commandDescription =
|
commandDescription =
|
||||||
"Generates and persists the given number of AllocationTokens, printing each token to stdout."
|
"Generates and persists the given number of AllocationTokens, "
|
||||||
)
|
+ "printing each token to stdout.")
|
||||||
@NonFinalForTesting
|
@NonFinalForTesting
|
||||||
class GenerateAllocationTokensCommand implements CommandWithRemoteApi {
|
class GenerateAllocationTokensCommand implements CommandWithRemoteApi {
|
||||||
|
|
||||||
|
|
|
@ -83,8 +83,9 @@ final class UniformRapidSuspensionCommand extends MutatingEppToolCommand {
|
||||||
|
|
||||||
@Parameter(
|
@Parameter(
|
||||||
names = {"-p", "--locks_to_preserve"},
|
names = {"-p", "--locks_to_preserve"},
|
||||||
description = "Comma-delimited set of locks to preserve (only valid with --undo). "
|
description =
|
||||||
+ "Valid locks: serverDeleteProhibited, serverTransferProhibited, serverUpdateProhibited")
|
"Comma-delimited set of locks to preserve (only valid with --undo). Valid "
|
||||||
|
+ "locks: serverDeleteProhibited, serverTransferProhibited, serverUpdateProhibited")
|
||||||
private List<String> locksToPreserve = new ArrayList<>();
|
private List<String> locksToPreserve = new ArrayList<>();
|
||||||
|
|
||||||
@Parameter(
|
@Parameter(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue