Examples of UserConfiguration


Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

     */
    @Nonnull
    @Override
    public TokenProvider getTokenProvider(Root root) {
        ConfigurationParameters tokenOptions = getParameters().getConfigValue(PARAM_TOKEN_OPTIONS, new ConfigurationParameters());
        UserConfiguration uc = getSecurityProvider().getConfiguration(UserConfiguration.class);
        return new TokenProviderImpl(root, tokenOptions, uc);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

    protected UserManager getUserManager() {
        UserManager userManager = null;
        SecurityProvider sp = getSecurityProvider();
        Root root = getRoot();
        if (root != null && sp != null) {
            UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
            userManager = uc.getUserManager(root, NamePathMapper.DEFAULT);
        }

        if (userManager == null && callbackHandler != null) {
            try {
                UserManagerCallback userCallBack = new UserManagerCallback();
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

                return repo.login(null, null);
            }
        });
        try {
            Root root = cs.getLatestRoot();
            UserConfiguration uc = sp.getConfiguration(UserConfiguration.class);
            UserManager umgr = uc.getUserManager(root, NamePathMapper.DEFAULT);
            Authorizable adminUser = umgr.getAuthorizable("admin");
            assertNotNull(adminUser);

            Tree adminTree = root.getTree(adminUser.getPath());
            assertTrue(adminTree.exists());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

                return repo.login(null, null);
            }
        });
        try {
            Root root = cs.getLatestRoot();
            UserConfiguration uc = sp.getConfiguration(UserConfiguration.class);
            UserManager umgr = uc.getUserManager(root, NamePathMapper.DEFAULT);
            Authorizable anonymous = umgr.getAuthorizable(UserConstants.DEFAULT_ANONYMOUS_ID);
            assertNull(anonymous);
        } finally {
            cs.close();
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

    public UserManagerImpl(Root root, NamePathMapper namePathMapper, SecurityProvider securityProvider) {
        this.root = root;
        this.namePathMapper = namePathMapper;
        this.securityProvider = securityProvider;

        UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
        this.config = uc.getParameters();
        this.userProvider = new UserProvider(root, config);
        this.membershipProvider = new MembershipProvider(root, config);
        this.actionProvider = getActionProvider(config);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

    }

    @Nonnull
    @Override
    public PrincipalProvider getPrincipalProvider(Root root, NamePathMapper namePathMapper) {
        UserConfiguration uc = getSecurityProvider().getConfiguration(UserConfiguration.class);
        return new PrincipalProviderImpl(root, uc, namePathMapper);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

        NodeState base = builder.getNodeState();
        MemoryNodeStore store = new MemoryNodeStore(base);

        Root root = new SystemRoot(store, commitHook, workspaceName, securityProvider, indexProvider);

        UserConfiguration userConfiguration = securityProvider.getConfiguration(UserConfiguration.class);
        UserManager userManager = userConfiguration.getUserManager(root, NamePathMapper.DEFAULT);

        String errorMsg = "Failed to initialize user content.";
        try {
            NodeUtil rootTree = checkNotNull(new NodeUtil(root.getTree("/")));
            NodeUtil index = rootTree.getOrAddChild(IndexConstants.INDEX_DEFINITIONS_NAME, JcrConstants.NT_UNSTRUCTURED);

            if (!index.hasChild("authorizableId")) {
                IndexUtils.createIndexDefinition(index, "authorizableId", true, new String[]{REP_AUTHORIZABLE_ID}, null);
            }
            if (!index.hasChild("principalName")) {
                IndexUtils.createIndexDefinition(index, "principalName", true,
                        new String[]{REP_PRINCIPAL_NAME},
                        new String[]{NT_REP_AUTHORIZABLE});
            }
            if (!index.hasChild("members")) {
                IndexUtils.createIndexDefinition(index, "members", false, new String[]{UserConstants.REP_MEMBERS}, null);
            }

            ConfigurationParameters params = userConfiguration.getParameters();
            String adminId = params.getConfigValue(PARAM_ADMIN_ID, DEFAULT_ADMIN_ID);
            if (userManager.getAuthorizable(adminId) == null) {
                boolean omitPw = params.getConfigValue(PARAM_OMIT_ADMIN_PW, false);
                userManager.createUser(adminId, (omitPw) ? null : adminId);
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

        options.put(LdapSettings.KEY_AUTOCREATEGROUP + InternalLdapServer.GROUP_MEMBER_ATTR, GROUP_PROP);
        options.put(LdapSettings.KEY_GROUPFILTER, "(objectclass=" + InternalLdapServer.GROUP_CLASS_ATTR + ')');
        options.put(LdapSettings.KEY_GROUPMEMBERSHIPATTRIBUTE, InternalLdapServer.GROUP_MEMBER_ATTR);
        options.put(ExternalLoginModule.PARAM_SYNC_MODE, SyncMode.CREATE_USER);

        UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
        userManager = uc.getUserManager(root, NamePathMapper.DEFAULT);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

        return acCtx;
    }

    Context getUserContext() {
        if (userCtx == null) {
            UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
            userCtx = uc.getContext();
        }
        return userCtx;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

                return repo.login(null, null);
            }
        });
        try {
            Root root = cs.getLatestRoot();
            UserConfiguration uc = sp.getConfiguration(UserConfiguration.class);
            UserManager umgr = uc.getUserManager(root, NamePathMapper.DEFAULT);
            Authorizable adminUser = umgr.getAuthorizable("admin");
            assertNotNull(adminUser);

            Tree adminTree = root.getTree(adminUser.getPath());
            assertTrue(adminTree.exists());
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.