Examples of SimpleRole


Examples of org.apache.shiro.authz.SimpleRole

            if (passwordAndRolesArray.length > 1) {
                for (int i = 1; i < passwordAndRolesArray.length; i++) {
                    String rolename = passwordAndRolesArray[i];
                    account.addRole(rolename);

                    SimpleRole role = getRole(rolename);
                    if (role != null) {
                        account.addObjectPermissions(role.getPermissions());
                    }
                }
            } else {
                account.setRoles(null);
            }
View Full Code Here

Examples of org.apache.shiro.authz.SimpleRole

        }

        for (String rolename : roleDefs.keySet()) {
            String value = roleDefs.get(rolename);

            SimpleRole role = getRole(rolename);
            if (role == null) {
                role = new SimpleRole(rolename);
                add(role);
            }

            Set<Permission> permissions = PermissionUtils.resolveDelimitedPermissions(value, getPermissionResolver());
            role.setPermissions(permissions);
        }
    }
View Full Code Here

Examples of org.apache.shiro.authz.SimpleRole

            if (passwordAndRolesArray.length > 1) {
                for (int i = 1; i < passwordAndRolesArray.length; i++) {
                    String rolename = passwordAndRolesArray[i];
                    account.addRole(rolename);

                    SimpleRole role = getRole(rolename);
                    if (role != null) {
                        account.addObjectPermissions(role.getPermissions());
                    }
                }
            } else {
                account.setRoles(null);
            }
View Full Code Here

Examples of org.apache.shiro.authz.SimpleRole

    public boolean roleExists(String name) {
        return getRole(name) != null;
    }

    public void addRole(String name) {
        add(new SimpleRole(name));
    }
View Full Code Here

Examples of org.jboss.errai.bus.server.security.auth.SimpleRole

  }

  public boolean endSession(Message message) {
    boolean sessionEnded = isAuthenticated(message);
    if (sessionEnded) {
      getAuthDescriptor(message).remove(new SimpleRole(CredentialTypes.Authenticated.name()));
      message.getResource(QueueSession.class, "Session").removeAttribute(ErraiService.SESSION_AUTH_DATA);
      return true;
    }
    else {
      return false;
View Full Code Here

Examples of org.jboss.errai.bus.server.security.auth.SimpleRole

    }

    public boolean endSession(Message message) {
        boolean sessionEnded = isAuthenticated(message);
        if (sessionEnded) {
            getAuthDescriptor(message).remove(new SimpleRole(CredentialTypes.Authenticated.name()));
            message.getResource(QueueSession.class, "Session").removeAttribute(ErraiService.SESSION_AUTH_DATA);
            return true;
        } else {
            return false;
        }
View Full Code Here

Examples of org.jboss.errai.bus.server.security.auth.SimpleRole

    }

    public boolean endSession(Message message) {
        boolean sessionEnded = isAuthenticated(message);
        if (sessionEnded) {
            getAuthDescriptor(message).remove(new SimpleRole(CredentialTypes.Authenticated.name()));
            message.getResource(QueueSession.class, "Session").removeAttribute(ErraiService.SESSION_AUTH_DATA);
            return true;
        } else {
            return false;
        }
View Full Code Here

Examples of org.jboss.identity.idm.impl.api.model.SimpleRole

      //TODO: add createRoleType switch to the API

      IdentityObjectRelationship rel = getRepository().createRelationship(getInvocationContext(), createIdentityObject(group), createIdentityObject(identity), ROLE, roleType.getName(), false);

      //TODO: null id - IdentityObjectRelationship doesn't have id
      return new SimpleRole(new SimpleRoleType(rel.getName()), createUser(rel.getToIdentityObject()), createGroup(rel.getFromIdentityObject()));

   }
View Full Code Here

Examples of org.jboss.identity.idm.impl.api.model.SimpleRole

         throw new IdentityException("More than one role definition present - illegal state!");
      }

      IdentityObjectRelationship relationship = rels.iterator().next();

      return new SimpleRole(new SimpleRoleType(relationship.getType().getName()),
         createUser(relationship.getFromIdentityObject()),
         createGroup(relationship.getToIdentityObject()));
   }
View Full Code Here

Examples of org.jboss.identity.idm.impl.api.model.SimpleRole

      for (IdentityObjectRelationship relationship : relationships)
      {
         if (roleType.getName().equals(relationship.getName()))
         {
            roles.add(new SimpleRole(new SimpleRoleType(relationship.getName()), createUser(relationship.getToIdentityObject()), createGroup(relationship.getFromIdentityObject())));
         }
      }

      return roles;
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.