mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Change messages about failed authentication to be warnings instead of info messages
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=155114145
This commit is contained in:
parent
93c2a1e4f0
commit
354e1fb8b2
1 changed files with 4 additions and 4 deletions
|
@ -63,13 +63,13 @@ public class RequestAuthenticator {
|
|||
break;
|
||||
case APP:
|
||||
if (!authResult.isAuthenticated()) {
|
||||
logger.info("Not authorized; no authentication found");
|
||||
logger.warning("Not authorized; no authentication found");
|
||||
return Optional.absent();
|
||||
}
|
||||
break;
|
||||
case USER:
|
||||
if (authResult.authLevel() != AuthLevel.USER) {
|
||||
logger.info("Not authorized; no authenticated user");
|
||||
logger.warning("Not authorized; no authenticated user");
|
||||
// TODO(mountford): change this so that the caller knows to return a more helpful error
|
||||
return Optional.absent();
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class RequestAuthenticator {
|
|||
switch (auth.userPolicy()) {
|
||||
case IGNORED:
|
||||
if (authResult.authLevel() == AuthLevel.USER) {
|
||||
logger.info("Not authorized; user policy is IGNORED, but a user was found");
|
||||
logger.warning("Not authorized; user policy is IGNORED, but a user was found");
|
||||
return Optional.absent();
|
||||
}
|
||||
break;
|
||||
|
@ -88,7 +88,7 @@ public class RequestAuthenticator {
|
|||
case ADMIN:
|
||||
if (authResult.userAuthInfo().isPresent()
|
||||
&& !authResult.userAuthInfo().get().isUserAdmin()) {
|
||||
logger.info("Not authorized; user policy is ADMIN, but the user was not an admin");
|
||||
logger.warning("Not authorized; user policy is ADMIN, but the user was not an admin");
|
||||
return Optional.absent();
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue