Package org.archive.cdxserver.auth

Examples of org.archive.cdxserver.auth.AuthToken


    CDXQuery query = (CDXQuery)args[0];
    String[] filter = query.getFilter();
    assertEquals(1, filter.length);
    assertEquals("!statuscode:(500|502|504)", filter[0]);
   
    AuthToken authToken = (AuthToken)args[1];
    assertFalse(authToken.isIgnoreRobots());
  }
View Full Code Here


   
    assertEquals(1, testCDXServer.capturedArgs.size());
   
    Object[] args = testCDXServer.capturedArgs.get(0);
    //CDXQuery query = (CDXQuery)args[0];
    AuthToken authToken = (AuthToken)args[1];
    assertTrue(authToken.isIgnoreRobots());
  }
View Full Code Here

        if (url.isEmpty()) {
            start = url;
            end = url;
            host = "*";
        } else {
            AuthToken authToken = super.createAuthToken(request);
           
            CDXAccessFilter accessChecker = null;
           
      if (!authChecker.isAllUrlAccessAllowed(authToken)) {
        accessChecker = authChecker.createAccessFilter(authToken);
View Full Code Here

        this.ajaxAccessControl = ajaxAccessControl;
    }
   
    protected AuthToken createAuthToken(HttpServletRequest request)
    {
      return new AuthToken(extractAuthToken(request, cookieAuthToken));
    }
View Full Code Here

        responseWriter = new MementoLinkWriter(request, response, query, gzip);     
      } else {
        responseWriter = new PlainTextWriter(response, gzip);
      }
     
      AuthToken authToken = super.createAuthToken(request);
   
      getCdx(query, authToken, responseWriter);
     
    } catch (IOException io) {
      responseWriter.serverError(io);
View Full Code Here

         * @param urlkey
         * @return {@link AuthToken} representing user's privileges on {@code urlkey}.
   */
  protected AuthToken createAuthToken(WaybackRequest wbRequest, String urlkey)
  {
    AuthToken waybackAuthToken = new APContextAuthToken(wbRequest.getAccessPoint());
        waybackAuthToken.setAllCdxFieldsAllow();
       
      boolean ignoreRobots = wbRequest.isCSSContext() || wbRequest.isIMGContext() || wbRequest.isJSContext();
     
      if (ignoreRobots) {
        waybackAuthToken.setIgnoreRobots(true);
      }
     
    if (ignoreRobotPaths != null) {
      for (String path : ignoreRobotPaths) {
        if (urlkey.startsWith(path)) {
            waybackAuthToken.setIgnoreRobots(true);
          break;
        }
      }
    }
     
View Full Code Here

      throw new BadQueryException(ue.toString());
    }

    //Do local access/url validation check   
        //AuthToken waybackAuthToken = new AuthToken(wbRequest.get(CDXServer.CDX_AUTH_TOKEN));
        AuthToken waybackAuthToken = createAuthToken(wbRequest, urlkey);
       
        CDXToSearchResultWriter resultWriter = null;
        SearchResults searchResults = null;
       
        if (wbRequest.isReplayRequest() || wbRequest.isCaptureQueryRequest()) {
View Full Code Here

TOP

Related Classes of org.archive.cdxserver.auth.AuthToken

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.