Search in sources :

Example 1 with UserPrincipal

use of org.apache.openejb.core.security.jaas.UserPrincipal in project tomee by apache.

the class TestLoginModule method commit.

public boolean commit() throws LoginException {
    principals.add(new UserPrincipal(user));
    principals.add(new GroupPrincipal(user));
    subject.getPrincipals().addAll(principals);
    user = null;
    return true;
}
Also used : GroupPrincipal(org.apache.openejb.core.security.jaas.GroupPrincipal) UserPrincipal(org.apache.openejb.core.security.jaas.UserPrincipal)

Aggregations

GroupPrincipal (org.apache.openejb.core.security.jaas.GroupPrincipal)1 UserPrincipal (org.apache.openejb.core.security.jaas.UserPrincipal)1