Package org.apache.lucene.gdata.server.authentication

Examples of org.apache.lucene.gdata.server.authentication.AuthenticationController


        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);
View Full Code Here


        String clientIp = request.getRemoteAddr();
        if (LOG.isDebugEnabled())
            LOG
                    .debug("Authenticating Account for GDataRequest -- modifying entries -- Role: "
                            + role + "; ClientIp: " + clientIp);
        AuthenticationController controller = GDataServerRegistry.getRegistry()
                .lookup(AuthenticationController.class,
                        ComponentType.AUTHENTICATIONCONTROLLER);
        String token = getTokenFromRequest(request);
        if (LOG.isDebugEnabled())
            LOG.debug("Got Token: " + token + ";");
        if (token == null)
            return false;
        return controller.authenticateToken(token, clientIp, role, null);

    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.gdata.server.authentication.AuthenticationController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.