if (LOG.isDebugEnabled())
LOG
.debug("Authenticating Account for GDataRequest -- modifying entries -- Role: "
+ role + "; ClientIp: " + clientIp);
AuthenticationController controller = GDataServerRegistry.getRegistry()
.lookup(AuthenticationController.class,
ComponentType.AUTHENTICATIONCONTROLLER);
ServiceFactory factory = GDataServerRegistry.getRegistry().lookup(
ServiceFactory.class, ComponentType.SERVICEFACTORY);
AdminService adminService = factory.getAdminService();
GDataAccount account;
try {
account = adminService.getFeedOwningAccount(request.getFeedId());
String token = getTokenFromRequest(request.getHttpServletRequest());
if (LOG.isDebugEnabled())
LOG.debug("Got Token: " + token + "; for requesting account: "
+ account);
if (account != null && token != null)
return controller.authenticateToken(token, clientIp,
AccountRole.ENTRYAMINISTRATOR, account.getName());
} catch (ServiceException e) {
LOG.error("can get GDataAccount for feedID -- "
+ request.getFeedId(), e);