Package org.jboss.security.auth.spi

Examples of org.jboss.security.auth.spi.Users$User


        this.digester = digester;
    }

    public Object createObject(Attributes attributes) {
        String host = attributes.getValue("host");
        User user = (User) digester.peek();
        Subscription subscription = user.createSubscription(host);
        String autoConnect = attributes.getValue("autoConnect");
        if (autoConnect == null) {
            autoConnect = "false";
        }
        if ("true".equalsIgnoreCase(autoConnect) ||
View Full Code Here


        this.digester = digester;
    }

    public Object createObject(Attributes attributes) {
        String username = attributes.getValue("username");
        User user = database.createUser(username);
        user.setFromAddress(attributes.getValue("fromAddress"));
        user.setFullName(attributes.getValue("fullName"));
        user.setPassword(attributes.getValue("password"));
        user.setReplyToAddress(attributes.getValue("replyToAddress"));
        return (user);
    }
View Full Code Here

         ace.getLoginModuleName().equals("org.jboss.security.auth.spi.XMLLoginModule"));
      Map options = ace.getOptions();
      assertTrue("Options.size == 2", options.size() == 2);
      String guest = (String) options.get("unauthenticatedIdentity");
      assertTrue("guest", guest.equals("guest"));
      Users users = (Users) options.get("userInfo");
      Users.User user = users.getUser("jdukeman");
      String name = user.getName();
      assertTrue("name == jdukeman", name.equals("jdukeman"));
      String passwrd = user.getPassword();
      assertTrue("passwrd == anotherduke", passwrd.equals("anotherduke"));
      String[] roleNames = user.getRoleNames();
View Full Code Here

      String unauthenticatedIdentity = (String) options.get("unauthenticatedIdentity");
      assertNotNull("options.unauthenticatedIdentity exists", unauthenticatedIdentity);
      assertTrue("options.unauthenticatedIdentity == guest",
         unauthenticatedIdentity.equals("guest"));

      Users users = (Users) options.get("userInfo");
      assertNotNull("options.userInfo is a Users", users);
      assertTrue("Users.size("+users.size()+") is 6", users.size() == 6);
      Users.User jduke = users.getUser("jduke");
      assertNotNull("jduke is a user", jduke);
      assertTrue("jduke.password == theduke", jduke.getPassword().equals("theduke"));
      String[] roleNames = jduke.getRoleNames("Roles");
      HashSet roles = new HashSet(Arrays.asList(roleNames));
      assertTrue("jduke has roles", roles.size() == 3);
View Full Code Here

TOP

Related Classes of org.jboss.security.auth.spi.Users$User

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.