Package org.apache.jackrabbit.oak.spi.security.authentication.external

Examples of org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup


    public void testGetMembers() throws Exception {
        ExternalIdentityRef ref = new ExternalIdentityRef(TEST_GROUP1_DN, IDP_NAME);
        ExternalIdentity id = idp.getIdentity(ref);
        assertTrue("Group instance", id instanceof ExternalGroup);

        ExternalGroup grp = (ExternalGroup) id;
        assertIfEquals("Group members", TEST_GROUP1_MEMBERS, grp.getDeclaredMembers());
    }
View Full Code Here


                    return new SyncResultImpl(new SyncedIdentityImpl(id, null, false, -1), SyncResult.Status.FOREIGN);
                }

                if (auth instanceof Group) {
                    Group group = (Group) auth;
                    ExternalGroup external = idp.getGroup(id);
                    timer.mark("retrieve");
                    if (external == null) {
                        SyncedIdentityImpl syncId = createSyncedIdentity(auth);
                        if (group.getDeclaredMembers().hasNext()) {
                            log.info("won't remove local group with members: {}", id);
View Full Code Here

            timer.mark("reading");

            for (ExternalIdentityRef ref: externalGroups) {
                log.debug("- processing membership {}", ref.getId());
                // get group
                ExternalGroup extGroup;
                try {
                    extGroup = (ExternalGroup) idp.getIdentity(ref);
                } catch (ClassCastException e) {
                    // this should really not be the case, so catching the CCE is ok here.
                    log.warn("External identity '{}' is not a group, but should be one.", ref.getString());
                    continue;
                } catch (ExternalIdentityException e) {
                    log.warn("Unable to retrieve external group '{}' from provider.", ref.getString(), e);
                    continue;
                }
                if (extGroup == null) {
                    log.warn("External group for ref '{}' could not be retrieved from provider.", ref);
                    continue;
                }
                log.debug("- idp returned '{}'", extGroup.getId());

                Group grp;
                try {
                    grp = (Group) userManager.getAuthorizable(extGroup.getId());
                } catch (ClassCastException e) {
                    // this should really not be the case, so catching the CCE is ok here.
                    log.warn("Authorizable '{}' is not a group, but should be one.", extGroup.getId());
                    continue;
                }
                log.debug("- user manager returned '{}'", grp);

                if (grp == null) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup

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.