Examples of EndpointGenerator


Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator

            String message = "Couldn't find the application.";
      log.warn(message);
      return RestResponse.failure(message);
    }
   
    EndpointGenerator generator =
        EndpointDatabaseFactory.getDatabase(getProjectConfig(application));
   
    if (generator != null) {
            List<Endpoint> endpoints = generator.generateEndpoints();


      return RestResponse.success(getEndpointInfo(endpoints));
    } else {
      return RestResponse.failure("Unable to create an EndpointGenerator.");
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator

    }

    // Since header.jsp is in every page, the debug parameter should also be in every page.
    @Test
    public void testParameters() {
        EndpointGenerator generator = new JSPMappings(new File(TestConstants.BODGEIT_SOURCE_LOCATION));

        for (Endpoint endpoint : generator) {

            // footer.jsp and init.jsp don't have debug, but all the others should.
            if (!endpoint.getFilePath().equals("/root/footer.jsp") && !endpoint.getFilePath().equals("/root/init.jsp"))
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator

    }

    @Test
    public void testAllFrameworks() {
        for (String app : SpringDetectionTests.ALL_SPRING_APPS) {
            EndpointGenerator mappings = new SpringControllerMappings(new File(TestConstants.getFolderName(app)));
            assertFalse("No endpoints found in app " + app + ".", mappings.generateEndpoints().isEmpty());
        }
    }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator

        }
    }

    public void writeCsvFile() {
        for (String app : SpringDetectionTests.ALL_SPRING_APPS) {
            EndpointGenerator mappings = new SpringControllerMappings(new File(TestConstants.getFolderName(app)));
            for (Endpoint endpoint : mappings.generateEndpoints()) {
                System.out.print(app + ",");
                System.out.println(endpoint.getCSVLine());
            }
        }
    }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator

*/
public class WebFormsEndpointGeneratorTests {

    @Test
    public void testBasic() {
        EndpointGenerator endpointGenerator = new WebFormsEndpointGenerator(new File(TestConstants.WEB_FORMS_SAMPLE));

        List<Endpoint> endpoints = endpointGenerator.generateEndpoints();
        assert !endpoints.isEmpty() : "Got empty endpoints for " + TestConstants.WEB_FORMS_SAMPLE;

        Set<String> parameters = endpoints.get(0).getParameters();
        assert parameters.contains("newitem") :
            "Parameters didn't contain newitem: " + parameters;
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator

            "Parameters didn't contain newitem: " + parameters;
    }

    @Test
    public void testBasicDirectoryResolution() {
        EndpointGenerator endpointGenerator = new WebFormsEndpointGenerator(new File(TestConstants.RISK_E_UTILITY));

        List<Endpoint> endpoints = endpointGenerator.generateEndpoints();
        assert !endpoints.isEmpty() : "Got empty endpoints for " + TestConstants.RISK_E_UTILITY;

        boolean gotPage = false;

        for (Endpoint endpoint : endpoints) {
View Full Code Here

Examples of nl.surfnet.spring.security.opensaml.xml.EndpointGenerator

  }

  private void sendAuthnRequest(HttpServletResponse response, String authState, String returnUri) throws IOException {
    AuthnRequestGenerator authnRequestGenerator = new AuthnRequestGenerator(openSAMLContext.entityId(), timeService,
            idService);
    EndpointGenerator endpointGenerator = new EndpointGenerator();

    final String target = openSAMLContext.getIdpUrl();

    Endpoint endpoint = endpointGenerator.generateEndpoint(
            SingleSignOnService.DEFAULT_ELEMENT_NAME, target, openSAMLContext.assertionConsumerUri());

    AuthnRequest authnRequest = authnRequestGenerator.generateAuthnRequest(target, openSAMLContext.assertionConsumerUri());

    Client client = getClientByRequest(authState);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.