Package org.infinispan.security

Examples of org.infinispan.security.PrincipalRoleMapper


         }
         if (cachedMask != null) {
            return cachedMask;
         } else {
            int mask = 0;
            PrincipalRoleMapper roleMapper = globalConfiguration.authorization().principalRoleMapper();
            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


            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

      checkPermission(globalConfiguration, 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

      checkPermission(globalConfiguration, null, perm);
   }

   public static int computeSubjectRoleMask(Subject subject, GlobalSecurityConfiguration globalConfiguration,
         AuthorizationConfiguration configuration) {
      PrincipalRoleMapper roleMapper = globalConfiguration.authorization().principalRoleMapper();
      int mask = 0;
      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

            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

   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

            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

Related Classes of org.infinispan.security.PrincipalRoleMapper

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.