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:
gbrodman 2019-02-04 13:17:35 -08:00 committed by jianglai
parent a325f0a50b
commit 058ef07e16
5 changed files with 28 additions and 27 deletions

View file

@ -158,22 +158,22 @@ public class RequestAuthenticator {
private AuthResult authenticate(AuthSettings auth, HttpServletRequest req) {
checkAuthConfig(auth);
for (AuthMethod authMethod : auth.methods()) {
AuthResult authResult;
switch (authMethod) {
// App Engine internal authentication, using the queue name header
case INTERNAL: {
// checkAuthConfig will have insured that the user policy is not USER.
AuthResult authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
return authResult;
}
// App Engine internal authentication, using the queue name header
case INTERNAL:
// checkAuthConfig will have insured that the user policy is not USER.
authResult = appEngineInternalAuthenticationMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log("Authenticated via internal auth: %s", authResult);
return authResult;
}
break;
// API-based user authentication mechanisms, such as OAuth
case API:
// checkAuthConfig will have insured that the user policy is not IGNORED.
for (AuthenticationMechanism authMechanism : apiAuthenticationMechanisms) {
AuthResult authResult = authMechanism.authenticate(req);
authResult = authMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log(
"Authenticated via %s: %s", authMechanism.getClass().getSimpleName(), authResult);
@ -184,7 +184,7 @@ public class RequestAuthenticator {
// Legacy authentication via UserService
case LEGACY:
// checkAuthConfig will have insured that the user policy is not IGNORED.
AuthResult authResult = legacyAuthenticationMechanism.authenticate(req);
authResult = legacyAuthenticationMechanism.authenticate(req);
if (authResult.isAuthenticated()) {
logger.atInfo().log("Authenticated via legacy auth: %s", authResult);
return authResult;