Package org.jboss.metadata.web.spec

Examples of org.jboss.metadata.web.spec.AuthConstraintMetaData


      // web-resource-collection/web-resource-name = exact, get method, roleA
      wrc.getUrlPatterns().add("/protected/exact/get/roleA");
      wrc.getHttpMethods().add("GET");

      // auth-constraint/role-name = RoleA
      AuthConstraintMetaData ac = new AuthConstraintMetaData();
      ArrayList<String> roles = new ArrayList<String>();
      roles.add("RoleA");
      ac.setRoleNames(roles);
      sc1.setAuthConstraint(ac);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here


      wrc.getHttpMethods().add("TRACE");
      wrc.getHttpMethods().add("OPTIONS");
      wrc.getHttpMethods().add("DELETE");

      // auth-constraint/role-name = RoleB
      AuthConstraintMetaData ac = new AuthConstraintMetaData();
      ArrayList<String> roles = new ArrayList<String>();
      roles.add("RoleB");
      ac.setRoleNames(roles);
      sc1.setAuthConstraint(ac);
   }
View Full Code Here

      wrcna.getHttpMethods().add("OPTIONS");
      wrcna.getHttpMethods().add("TRACE");
      wrcna.getHttpMethods().add("GET");
      wrcna.getHttpMethods().add("POST");

      AuthConstraintMetaData excluded = new AuthConstraintMetaData();
      sc1.setAuthConstraint(excluded);
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
      sc1.setUserDataConstraint(none);
View Full Code Here

      sc1.getResourceCollections().add(wrc1);
      wrc1.getUrlPatterns().add("/restricted/post-only/excluded/*");
      wrc1.getUrlPatterns().add("/*");

      // <auth-constraint />
      AuthConstraintMetaData excluded = new AuthConstraintMetaData();
      sc1.setAuthConstraint(excluded);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
      sc1.setUserDataConstraint(none);
      securityContraints.add(sc1);

      SecurityConstraintMetaData sc2 = new SecurityConstraintMetaData();
      sc2.setDisplayName("SC2");
      // web-resource-collection/web-resource-name = Restricted POST
      WebResourceCollectionMetaData wrc2 = new WebResourceCollectionMetaData();
      wrc2.setName("Restricted POST");
      sc2.getResourceCollections().add(wrc2);
      wrc2.getUrlPatterns().add("/restricted/post-only/*");
      wrc2.getHttpMethods().add("POST");
      AuthConstraintMetaData ac2 = new AuthConstraintMetaData();
      ac2.getRoleNames().add("PostRole");
      sc2.setAuthConstraint(ac2);
      sc2.setUserDataConstraint(none);
      securityContraints.add(sc2);

      SecurityConstraintMetaData sc3 = new SecurityConstraintMetaData();
View Full Code Here

      wrc2.getUrlPatterns().add("TRACE");
      wrc2.getUrlPatterns().add("GET");
      wrc2.getUrlPatterns().add("POST");

      // <auth-constraint />
      AuthConstraintMetaData excluded = new AuthConstraintMetaData();
      sc1.setAuthConstraint(excluded);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here

      // All Access
      wrc1.getUrlPatterns().add("/restricted/get-only/*");
      wrc1.getHttpMethods().add("GET");

      // auth-constraint/role-name = GetRole
      AuthConstraintMetaData ac1 = new AuthConstraintMetaData();
      ac1.getRoleNames().add("GetRole");
      sc1.setAuthConstraint(ac1);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here

      wrc1.getHttpMethods().add("OPTIONS");
      wrc1.getHttpMethods().add("TRACE");
      wrc1.getHttpMethods().add("POST");

      // <auth-constraint />
      AuthConstraintMetaData excluded = new AuthConstraintMetaData();
      sc1.setAuthConstraint(excluded);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here

      // All Access
      wrc1.getUrlPatterns().add("/restricted/post-only/*");
      wrc1.getHttpMethods().add("POST");

      // auth-constraint/role-name = GetRole
      AuthConstraintMetaData ac1 = new AuthConstraintMetaData();
      ac1.getRoleNames().add("PostRole");
      sc1.setAuthConstraint(ac1);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here

      wrc1.getHttpMethods().add("OPTIONS");
      wrc1.getHttpMethods().add("TRACE");
      wrc1.getHttpMethods().add("GET");

      // <auth-constraint />
      AuthConstraintMetaData excluded = new AuthConstraintMetaData();
      sc1.setAuthConstraint(excluded);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here

      wrc1.getHttpMethods().add("TRACE");
      wrc1.getHttpMethods().add("GET");
      wrc1.getHttpMethods().add("POST");

      // auth-constraint/role-name = GetRole
      AuthConstraintMetaData ac1 = new AuthConstraintMetaData();
      ac1.getRoleNames().add("GetRole");
      ac1.getRoleNames().add("PostRole");
      sc1.setAuthConstraint(ac1);

      // user-data-constraint/transport-guarantee
      UserDataConstraintMetaData none = new UserDataConstraintMetaData();
      none.setTransportGuarantee(TransportGuaranteeType.NONE);
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.spec.AuthConstraintMetaData

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.