Examples of PrincipalRoleMapper


Examples of org.infinispan.security.PrincipalRoleMapper

            default: {
               throw ParseUtils.unexpectedAttribute(reader, i);
            }
         }
      }
      PrincipalRoleMapper roleMapper = null;
      while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
         Element element = Element.forName(reader.getLocalName());
         switch (element) {
            case IDENTITY_ROLE_MAPPER:
               if (roleMapper != null) {
View Full Code Here

Examples of org.infinispan.security.PrincipalRoleMapper

   public void checkPermission(AuthorizationPermission perm) {
      checkPermission(null, perm);
   }

   public static int computeSubjectRoleMask(Subject subject, GlobalSecurityConfiguration globalConfiguration, AuthorizationConfiguration configuration) {
      PrincipalRoleMapper roleMapper = globalConfiguration.authorization().principalRoleMapper();
      int mask = 0;
      if (subject != null) {
         for (Principal principal : subject.getPrincipals()) {
            Set<String> roleNames = roleMapper.principalToRoles(principal);
            if (roleNames != null) {
               for (String roleName : roleNames) {
                  // Skip roles not defined for this cache
                  if (configuration != null && !configuration.roles().contains(roleName))
                     continue;
View Full Code Here

Examples of org.infinispan.security.PrincipalRoleMapper

            default: {
               throw ParseUtils.unexpectedAttribute(reader, i);
            }
         }
      }
      PrincipalRoleMapper roleMapper = null;
      while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
         Element element = Element.forName(reader.getLocalName());
         switch (element) {
            case IDENTITY_ROLE_MAPPER:
               if (roleMapper != null) {
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.