Package org.jboss.seam.security

Examples of org.jboss.seam.security.SimplePrincipal


      return true;
   }

   public boolean commit() throws LoginException
   {       
      subject.getPrincipals().add(new SimplePrincipal(username));
     
      Group roleGroup = null;
     
      for ( Group g : subject.getPrincipals(Group.class) )     
      {
         if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
         {
            roleGroup = g;
            break;
         }
      }

      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);

      for (String role : roles)
      {
         roleGroup.addMember(new SimplePrincipal(role));
      }
     
      subject.getPrincipals().add(roleGroup);
     
      return true;
View Full Code Here


      return true;
   }

   public boolean commit() throws LoginException
   {       
      subject.getPrincipals().add(new SimplePrincipal(username));
     
      Group roleGroup = null;
     
      for ( Group g : subject.getPrincipals(Group.class) )     
      {
         if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
         {
            roleGroup = g;
            break;
         }
      }

      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);

      for (String role : roles)
      {
         roleGroup.addMember(new SimplePrincipal(role));
      }
     
      subject.getPrincipals().add(roleGroup);
     
      return true;
View Full Code Here

    @Override
    public boolean commit() throws LoginException {
        if(!loginSuccessful) {
            return false;
        }
        subject.getPrincipals().add(new SimplePrincipal(username));
        return true;
    }
View Full Code Here

      return true;
   }

   public boolean commit() throws LoginException
   {       
      subject.getPrincipals().add(new SimplePrincipal(username));
     
      Group roleGroup = null;
     
      for ( Group g : subject.getPrincipals(Group.class) )     
      {
         if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
         {
            roleGroup = g;
            break;
         }
      }

      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);

      for (String role : roles)
      {
         roleGroup.addMember(new SimplePrincipal(role));
      }
     
      subject.getPrincipals().add(roleGroup);
     
      return true;
View Full Code Here

      return true;
   }

   public boolean commit() throws LoginException
   {       
      subject.getPrincipals().add(new SimplePrincipal(username));
     
      Group roleGroup = null;
     
      for ( Group g : subject.getPrincipals(Group.class) )     
      {
         if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
         {
            roleGroup = g;
            break;
         }
      }

      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);

      for (String role : roles)
      {
         roleGroup.addMember(new SimplePrincipal(role));
      }
     
      subject.getPrincipals().add(roleGroup);
     
      return true;
View Full Code Here

      return true;
   }

   public boolean commit() throws LoginException
   {       
      subject.getPrincipals().add(new SimplePrincipal(username));
     
      Group roleGroup = null;
     
      for ( Group g : subject.getPrincipals(Group.class) )     
      {
         if ( ROLES_GROUP.equalsIgnoreCase( g.getName() ) )
         {
            roleGroup = g;
            break;
         }
      }

      if (roleGroup == null) roleGroup = new SimpleGroup(ROLES_GROUP);

      for (String role : roles)
      {
         roleGroup.addMember(new SimplePrincipal(role));
      }
     
      subject.getPrincipals().add(roleGroup);
     
      return true;
View Full Code Here

TOP

Related Classes of org.jboss.seam.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.