Examples of UserPrincipal


Examples of be.c4j.ee.security.model.UserPrincipal

        userInfo.putAll(values);
        return this;
    }

    public AuthenticationInfo build() {
        UserPrincipal principal = new UserPrincipal(principalId, userName, name);
        principal.addUserInfo(userInfo);
        AuthenticationInfo result;
        if (salt == null) {
            result = new SimpleAuthenticationInfo(principal, password, realmName);
        } else {
            result = new SimpleAuthenticationInfo(principal, password, salt, realmName);
View Full Code Here

Examples of cgl.shindig.security.UserPrincipal

        this.setPassword(user.getPassword());
    }

    public Principal getPrincipal() {
        if (principal == null) {
            principal = new UserPrincipal(this.getScreenname());
        }
        return principal;
    }
View Full Code Here

Examples of com.google.enterprise.adaptor.UserPrincipal

        ImmutableSet.of(new GroupPrincipal("group1", LOCAL_NAMESPACE));
    assertEquals(expectedGroupSet, groupSet);

    Set<UserPrincipal> expectedUserSet =
        ImmutableSet.of(
            new UserPrincipal("user1", LOCAL_NAMESPACE),
            new UserPrincipal("user2", LOCAL_NAMESPACE));
    Collection<Principal> users = groups.get(groupSet.iterator().next());
    Set<Principal> userSet = new HashSet<Principal>(users);
    assertEquals(expectedUserSet, userSet);
  }
View Full Code Here

Examples of com.opengamma.livedata.UserPrincipal

    DistributedEntitlementChecker client = new DistributedEntitlementChecker(fudgeRequestSender);

    LiveDataSpecification testSpec = new LiveDataSpecification(
        "TestNormalization",
        ExternalId.of("test1", "test1"));
    UserPrincipal megan = new UserPrincipal("megan", "127.0.0.1");

    // TODO reenable test once entitlement checking has been reimplemented correctly
    //assertTrue(client.isEntitled(megan, testSpec));
  }
View Full Code Here

Examples of com.sun.security.auth.UserPrincipal

            throw new NullPointerException("filesystem can't be null");
        }
        this.filesystem = filesystem;

        // TODO manages users & groups in JNode
        owner = new UserPrincipal("root");
        group = new GroupImpl("admins");
        group.addMember(owner);
    }
View Full Code Here

Examples of com.sun.security.auth.UserPrincipal

    public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry, ConnectionConfig connConfig)
    {
        super(connection, delegate, name, expiry);
        _connectionConfig = connConfig;       
        _transaction = new AutoCommitTransaction(this.getMessageStore());
        _principal = new UserPrincipal(connection.getAuthorizationID());
        _reference = new WeakReference<Session>(this);
        _id = getConfigStore().createId();
        getConfigStore().addConfiguredObject(this);
    }
View Full Code Here

Examples of java.nio.file.attribute.UserPrincipal

      Map<String, String[]> attributes = item.getAttributes();
      for (String type : attributes.keySet()) {

        GroupPrincipal group;
        UserPrincipal principal;

        try {
          String[] values = attributes.get(type);

          switch (type) {
View Full Code Here

Examples of org.apache.activemq.jaas.UserPrincipal

            throw new FailedLoginException("Login was not allowed (as specified in configuration).");
        }
       
        for (int i = 0; i < userNames.length; ++i) {
            if (userNames[i].length() > 0 ) {
                subject.getPrincipals().add(new UserPrincipal(userNames[i]));
            }
        }
       
        for (int i = 0; i < groupNames.length; ++i) {
            if (groupNames[i].length() > 0) {
View Full Code Here

Examples of org.apache.activemq.jaas.UserPrincipal

* @version $Rev: $ $Date: $
*/
public class UserPrincipalTest extends TestCase {

    public void testArguments() {
        UserPrincipal principal = new UserPrincipal("FOO");

       assertEquals("FOO", principal.getName());

        try {
            new UserPrincipal(null);
            fail("Should have thrown IllegalArgumentException");
        } catch (IllegalArgumentException ingore) {

        }
    }
View Full Code Here

Examples of org.apache.activemq.jaas.UserPrincipal

        }
    }

    public void testHash() {
        UserPrincipal p1 = new UserPrincipal("FOO");
        UserPrincipal p2 = new UserPrincipal("FOO");

        assertEquals(p1.hashCode(), p1.hashCode());
        assertEquals(p1.hashCode(), p2.hashCode());
    }
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.