Package org.jboss.security

Examples of org.jboss.security.SimplePrincipal


         properties.setProperty("j2ee.clientName", "JBoss Server Manager");
         properties.setProperty(NamingContext.JNP_DISABLE_DISCOVERY, "true");

         if (username!=null)
         {
            SecurityAssociation.setPrincipal(new SimplePrincipal(username));
            SecurityAssociation.setCredential(password);
         }

         setNamingContext(new InitialContext(properties));
      }
View Full Code Here


         if (domain != null)
         {
            String unauth = domain.unauthenticatedPrincipal();
            if (unauth != null && unauth.length() > 0)
            {
               callerPrincipal = new SimplePrincipal(unauth);
            }
         }
      }

      if (rm != null)
View Full Code Here

  
   public Subject authenticate(String user, String password) throws JMSSecurityException
   {
      if (trace) { log.trace("authenticating user " + user); }
     
      SimplePrincipal principal = new SimplePrincipal(user);
      char[] passwordChars = null;
      if (password != null)
      {
         passwordChars = password.toCharArray();
      }
View Full Code Here

        //The special user SUCKER_USER is used for creating internal connections that suck messages between nodes
        //It has automatic read/write access to all destinations
        return (checkType.equals(CheckType.READ) || checkType.equals(CheckType.WRITE));
      }

      Principal principal = user == null ? null : new SimplePrincipal(user);
 
      boolean hasRole = realmMapping.doesUserHaveRole(principal, rolePrincipals);

      if (trace) { log.trace("user " + user + (hasRole ? " is " : " is NOT ") + "authorized"); }
View Full Code Here

   public void addRole(Role r) {
      if (log.isTraceEnabled())
         log.trace("Adding role: " + r.toString());

      roles.put(r.name,r);
      SimplePrincipal p = new SimplePrincipal(r.name);
      if(r.read == true)
         read.add(p);
      if(r.write == true)
         write.add(p);
      if (r.create == true)
View Full Code Here

  
   public Subject authenticate(String user, String password) throws JMSSecurityException
   {
      if (trace) { log.trace("authenticating user " + user); }
     
      SimplePrincipal principal = new SimplePrincipal(user);
      char[] passwordChars = null;
      if (password != null)
      {
         passwordChars = password.toCharArray();
      }
View Full Code Here

        //The special user SUCKER_USER is used for creating internal connections that suck messages between nodes
        //It has automatic read/write access to all destinations
        return (checkType.equals(CheckType.READ) || checkType.equals(CheckType.WRITE));
      }

      Principal principal = user == null ? null : new SimplePrincipal(user);
 
      boolean hasRole = realmMapping.doesUserHaveRole(principal, rolePrincipals);

      if (trace) { log.trace("user " + user + (hasRole ? " is " : " is NOT ") + "authorized"); }
View Full Code Here

      {
         userRoles = new HashSet<Principal>();
         List<Role> rolesList = roles.getRoles();
         for(Role r: rolesList)
         {
            userRoles.add(new SimplePrincipal(r.getRoleName()));
         }
      }
      return userRoles;
   }
View Full Code Here

         {
            RoleGroup rg = (RoleGroup) role;
            List<Role> rolesList = rg.getRoles();
            for(Role r: rolesList)
            {
              principalsSet.add(new SimplePrincipal(r.getRoleName()));     
            }
         }
         else
            principalsSet.add(new SimplePrincipal(role.getRoleName()));
      }
      Principal[] arr = null;
      if(principalsSet != null)
      {
         arr = new Principal[principalsSet.size()];
View Full Code Here

   @Override
   protected void performSimpleLogin()
   {
      Principal up = null;
      if(userPrincipal instanceof String)
         up = new SimplePrincipal((String)userPrincipal);
      else
         up = (Principal) userPrincipal;
     
      SecurityContext sc = SecurityContextAssociation.getSecurityContext();
      if(sc == null)
View Full Code Here

TOP

Related Classes of org.jboss.security.SimplePrincipal

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.