Package org.infinispan.configuration.global

Examples of org.infinispan.configuration.global.GlobalAuthorizationConfigurationBuilder.role()


      GlobalAuthorizationConfigurationBuilder globalRoles = global.security().authorization()
            .principalRoleMapper(new IdentityRoleMapper());
      ConfigurationBuilder config = TestCacheManagerFactory.getDefaultCacheConfiguration(true);
      AuthorizationConfigurationBuilder authConfig = config.security().authorization().enable();

      globalRoles
         .role("listener").permission(AuthorizationPermission.LISTEN)
         .role("admin").permission(AuthorizationPermission.ALL);
      authConfig.role("listener").role("admin");
      return TestCacheManagerFactory.createCacheManager(global, config);
   }
View Full Code Here


      config.transaction().lockingMode(LockingMode.PESSIMISTIC);
      config.invocationBatching().enable();
      AuthorizationConfigurationBuilder authConfig = config.security().authorization().enable();

      for (AuthorizationPermission perm : AuthorizationPermission.values()) {
         globalRoles.role(perm.toString()).permission(perm);
         authConfig.role(perm.toString());
      }
      return TestCacheManagerFactory.createCacheManager(global, config);
   }
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.