Examples of GeronimoGroupPrincipal


Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

            //check the credentials by binding to server
            if (bindUser(context, dn, password)) {
                //if authenticated add more roles
                roles = getRoles(context, dn, username, roles);
                for (int i = 0; i < roles.size(); i++) {
                    groups.add(new GeronimoGroupPrincipal((String) roles.get(i)));
                }
            } else {
                return false;
            }
        } catch (CommunicationException e) {
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

    public void testGetCallerPrincipal() throws Exception {
        Subject subject = new Subject();
        GeronimoUserPrincipal userPrincipal = new GeronimoUserPrincipal("foo");
        RealmPrincipal realmPrincipal = new RealmPrincipal("realm", "domain", userPrincipal);
        PrimaryRealmPrincipal primaryRealmPrincipal = new PrimaryRealmPrincipal("realm", "domain", userPrincipal);
        GeronimoGroupPrincipal groupPrincipal = new GeronimoGroupPrincipal("bar");
        Set principals = subject.getPrincipals();
        principals.add(userPrincipal);
        principals.add(realmPrincipal);
        principals.add(primaryRealmPrincipal);
        principals.add(groupPrincipal);
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

            used = true;
            return true;
        }

        public boolean commit() throws LoginException {
            subject.getPrincipals().add(new GeronimoGroupPrincipal("Foo"));
            return true;
        }
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

        public boolean login() throws LoginException {
            return true;
        }

        public boolean commit() throws LoginException {
            subject.getPrincipals().add(new GeronimoGroupPrincipal("Foo"));
            return true;
        }
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

        public boolean login() throws LoginException {
            return true;
        }

        public boolean commit() throws LoginException {
            subject.getPrincipals().add(new GeronimoGroupPrincipal("Bar"));
            return true;
        }
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

            Set users = (Set) groups.get(groupName);
            Iterator iter = users.iterator();
            while (iter.hasNext()) {
                String user = (String) iter.next();
                if (username.equals(user)) {
                    principals.add(new GeronimoGroupPrincipal(groupName));
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

            used = true;
            return true;
        }

        public boolean commit() throws LoginException {
            subject.getPrincipals().add(new GeronimoGroupPrincipal("Foo"));
            return true;
        }
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

    public void testGetCallerPrincipal() throws Exception {
        Subject subject = new Subject();
        GeronimoUserPrincipal userPrincipal = new GeronimoUserPrincipal("foo");
        RealmPrincipal realmPrincipal = new RealmPrincipal("realm", "domain", userPrincipal);
        PrimaryRealmPrincipal primaryRealmPrincipal = new PrimaryRealmPrincipal("realm", "domain", userPrincipal);
        GeronimoGroupPrincipal groupPrincipal = new GeronimoGroupPrincipal("bar");
        Set principals = subject.getPrincipals();
        principals.add(userPrincipal);
        principals.add(realmPrincipal);
        principals.add(primaryRealmPrincipal);
        principals.add(groupPrincipal);
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

            //check the credentials by binding to server
            if (bindUser(context, dn, password)) {
                //if authenticated add more roles
                roles = getRoles(context, dn, username, roles);
                for (int i = 0; i < roles.size(); i++) {
                    groups.add(new GeronimoGroupPrincipal((String) roles.get(i)));
                }
            } else {
                return false;
            }
        } catch (CommunicationException e) {
View Full Code Here

Examples of org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal

        public boolean commit() throws LoginException {
            subject.getPrincipals().add(new MockPrincipal(username));
            for (String groupName : userGroupsMap.get(username)) {
                subject.getPrincipals().add(
                        new GeronimoGroupPrincipal(groupName));
            }
            return true;
        }
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.