Examples of ExternalIdentityRef


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

         *
         * @param auth the authorizable.
         * @return {@code true} if same IDP.
         */
        private boolean isSameIDP(@Nullable Authorizable auth) throws RepositoryException {
            ExternalIdentityRef ref = getIdentityRef(auth);
            return ref != null && idp.getName().equals(ref.getProviderName());
        }
View Full Code Here

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

        return null;
    }

    private ExternalUser createUser(Entry e, String id)
            throws LdapInvalidAttributeValueException {
        ExternalIdentityRef ref = new ExternalIdentityRef(e.getDn().getName(), this.getName());
        if (id == null) {
            id = e.get(config.getUserConfig().getIdAttribute()).getString();
        }
        String path = config.getUserConfig().makeDnPath()
                ? createDNPath(e.getDn())
View Full Code Here

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

        return user;
    }

    private ExternalGroup createGroup(Entry e, String name)
            throws LdapInvalidAttributeValueException {
        ExternalIdentityRef ref = new ExternalIdentityRef(e.getDn().getName(), this.getName());
        if (name == null) {
            name = e.get(config.getGroupConfig().getIdAttribute()).getString();
        }
        String path = config.getGroupConfig().makeDnPath()
                ? createDNPath(e.getDn())
View Full Code Here

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

            timer.mark("search");
            while (searchCursor.next()) {
                Response response = searchCursor.get();
                if (response instanceof SearchResultEntry) {
                    Entry resultEntry = ((SearchResultEntry) response).getEntry();
                    ExternalIdentityRef groupRef = new ExternalIdentityRef(resultEntry.getDn().toString(), this.getName());
                    groups.put(groupRef.getId(), groupRef);
                }
            }
            timer.mark("iterate");
            if (log.isDebugEnabled()) {
                log.debug("search below {} with {} found {} entries. {}",
View Full Code Here

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

            timer.mark("connect");
            Entry entry = connection.lookup(ref.getId());
            timer.mark("lookup");
            Attribute attr = entry.get(config.getGroupMemberAttribute());
            for (Value value: attr) {
                ExternalIdentityRef memberRef = new ExternalIdentityRef(value.getString(), this.getName());
                members.put(memberRef.getId(), memberRef);
            }
            timer.mark("iterate");
            if (log.isDebugEnabled()) {
                log.debug("members lookup of {} found {} members. {}", ref.getId(), members.size(), timer.getString());
            }
View Full Code Here

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

        return result;
    }

    private ExternalUser createUser(Entry e, String id)
            throws LdapInvalidAttributeValueException {
        ExternalIdentityRef ref = new ExternalIdentityRef(e.getDn().getName(), this.getName());
        if (id == null) {
            id = e.get(config.getUserConfig().getIdAttribute()).getString();
        }
        String path = config.getUserConfig().makeDnPath()
                ? createDNPath(e.getDn())
View Full Code Here

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

        return user;
    }

    private ExternalGroup createGroup(Entry e, String name)
            throws LdapInvalidAttributeValueException {
        ExternalIdentityRef ref = new ExternalIdentityRef(e.getDn().getName(), this.getName());
        if (name == null) {
            name = e.get(config.getGroupConfig().getIdAttribute()).getString();
        }
        String path = config.getGroupConfig().makeDnPath()
                ? createDNPath(e.getDn())
View Full Code Here

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

            timer.mark("search");
            while (searchCursor.next()) {
                Response response = searchCursor.get();
                if (response instanceof SearchResultEntry) {
                    Entry resultEntry = ((SearchResultEntry) response).getEntry();
                    ExternalIdentityRef groupRef = new ExternalIdentityRef(resultEntry.getDn().toString(), this.getName());
                    groups.put(groupRef.getId(), groupRef);
                }
            }
            timer.mark("iterate");
            if (log.isDebugEnabled()) {
                log.debug("search below {} with {} found {} entries. {}",
View Full Code Here

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

            timer.mark("connect");
            Entry entry = connection.lookup(ref.getId());
            timer.mark("lookup");
            Attribute attr = entry.get(config.getGroupMemberAttribute());
            for (Value value: attr) {
                ExternalIdentityRef memberRef = new ExternalIdentityRef(value.getString(), this.getName());
                members.put(memberRef.getId(), memberRef);
            }
            timer.mark("iterate");
            if (log.isDebugEnabled()) {
                log.debug("members lookup of {} found {} members. {}", ref.getId(), members.size(), timer.getString());
            }
View Full Code Here

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

     * @return the id
     * @throws RepositoryException if an error occurrs
     */
    @CheckForNull
    private static SyncedIdentityImpl createSyncedIdentity(@Nullable Authorizable auth) throws RepositoryException {
        ExternalIdentityRef ref = auth == null ? null : getIdentityRef(auth);
        if (ref == null) {
            return null;
        } else {
            Value[] lmValues = auth.getProperty(REP_LAST_SYNCED);
            long lastModified = -1;
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.