Package io.undertow.servlet.api

Examples of io.undertow.servlet.api.WebResourceCollection.addUrlPattern()


            di.addInitParameter("keycloak.config.resolver", keycloakConfigResolver.getCanonicalName());
        }
        if (isConstrained) {
            SecurityConstraint constraint = new SecurityConstraint();
            WebResourceCollection collection = new WebResourceCollection();
            collection.addUrlPattern(constraintUrl);
            constraint.addWebResourceCollection(collection);
            constraint.addRoleAllowed(role);
            di.addSecurityConstraint(constraint);
        }
        LoginConfig loginConfig = new LoginConfig("KEYCLOAK", "demo");
View Full Code Here


        ServletInfo regularServletInfo = new ServletInfo("servlet", SendUsernameServlet.class)
                .addMapping("/*");

        SecurityConstraint constraint = new SecurityConstraint();
        WebResourceCollection collection = new WebResourceCollection();
        collection.addUrlPattern("/*");
        constraint.addWebResourceCollection(collection);
        constraint.addRoleAllowed("manager");
        LoginConfig loginConfig = new LoginConfig("FORM", "Test Realm");

        ResourceManager resourceManager = new TestResourceManager(warResourcePath);
View Full Code Here

   }

   private void configureContextSecurity() {
      SecurityConstraint constraint = new SecurityConstraint();
      WebResourceCollection webCollection = new WebResourceCollection();
      webCollection.addUrlPattern("/rest/*");
      switch (securityMode) {
      case WRITE:
         // protect all writes
         webCollection.addHttpMethods("PUT", "POST", "DELETE");
         break;
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.