Examples of login()


Examples of org.apache.harmony.auth.module.LdapLoginModule.login()

        status.put("javax.security.auth.login.name", "leo");
        status.put("javax.security.auth.login.password", "faultPass".toCharArray());
        subject = new Subject();
        module.initialize(subject, new MockCallbackHandler(), status, options);
        try {
            module.login();
            fail("Should be failed for using password from shared state");
        }
        catch(LoginException e){
            //expected LoginException here
        }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.awt.LoginDialog.login()

        if (request != null) {
            dialog.setUserName(request.getName());
        }
        dialog.setVisible(true);
        dialog.toFront();
        dialog.login();
        dialog.setVisible(false);
        dialog.dispose();
        session = dialog.getSession();
        return session;
    }
View Full Code Here

Examples of org.apache.jackrabbit.api.JackrabbitRepository.login()

        prop.setProperty("org.apache.jackrabbit.repository.conf", TEST_DIR + "/repository.xml");
        JackrabbitRepository rep = (JackrabbitRepository) rf.getRepository(prop);
        RepositoryManager rm = rf.getRepositoryManager(rep);

        // need to login to start the repository
        Session session = rep.login(new SimpleCredentials("", "".toCharArray()));

        DataStoreGarbageCollector gc = rm.createDataStoreGarbageCollector();
        try {
            gc.mark();
            gc.sweep();
View Full Code Here

Examples of org.apache.jackrabbit.core.RepositoryImpl.login()

        try {
            RepositoryConfig config = RepositoryConfig.create(
                    configuration.getPath(), directory.getPath());
            RepositoryImpl repository = RepositoryImpl.create(config);
            try {
                Session session = repository.login(
                        new SimpleCredentials("admin", "admin".toCharArray()));
                try {
                    createTestData(session);
                } finally {
                    session.logout();
View Full Code Here

Examples of org.apache.jackrabbit.core.TransientRepository.login()

            throws RepositoryException, org.apache.sling.ide.transport.RepositoryException {

        File out = new File(new File("target"), "jackrabbit");
        TransientRepository repo = new TransientRepository(new File(out, "repository.xml"), new File(out, "repository"));
        SimpleCredentials credentials = new SimpleCredentials("admin", "admin".toCharArray());
        Session session = repo.login(credentials);
        try {
            Node contentNode = session.getRootNode().addNode("content");
            if (initialPropertyValues instanceof String) {
                contentNode.setProperty(PROP_NAME, (String) initialPropertyValues);
            } else if (initialPropertyValues instanceof String[]) {
View Full Code Here

Examples of org.apache.jackrabbit.core.security.AuthContext.login()

                authCtx = new AuthContext.JAAS(repConfig.getAppName(), credentials);
            } else {
                authCtx = new AuthContext.Local(
                        lmc.getLoginModule(), lmc.getParameters(), credentials);
            }
            authCtx.login();

            // create session
            return createSession(authCtx, workspaceName);
        } catch (SecurityException se) {
            throw new LoginException(
View Full Code Here

Examples of org.apache.jackrabbit.core.security.JahiaLoginModule.login()

        }, sharedState, options);

        try {
            JahiaLoginModule.Token t = JahiaLoginModule.getToken(simpleCreds.getUserID(), new String(
                    simpleCreds.getPassword()));
            m.login();
            m.commit();
            credentials = JahiaLoginModule.getCredentials(simpleCreds.getUserID(), t != null ? t.deniedPath : null);
        } catch (javax.security.auth.login.LoginException e) {
            throw new LoginException(e);
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.security.authentication.AuthContext.login()

        } else {
            log.debug("Found preauthenticated Subject, try to extend authentication");
            // login either using JAAS or custom LoginModule
            AuthContext authCtx = getSecurityManager().getAuthContext(null, subject, workspaceName);
            try {
                authCtx.login();
                s = createSession(authCtx, workspaceName);
            } catch (javax.security.auth.login.LoginException e) {
                // subject could not be extended
                log.debug("Preauthentication could not be extended");
                s = createSession(subject, workspaceName);
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.ContentRepository.login()

                final ContentRepository repository = rcb.getContentRepository();
                systemSession = Subject.doAs(SystemSubject.INSTANCE, new PrivilegedExceptionAction<ContentSession>() {
                    @Override
                    public ContentSession run() throws LoginException, NoSuchWorkspaceException {
                        return repository.login(null, rcb.getWorkspaceName());
                    }
                });
                root = systemSession.getLatestRoot();
            } catch (UnsupportedCallbackException e) {
                log.debug(e.getMessage());
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.RepositoryService.login()

    public Session login(Credentials credentials, String workspaceName) throws RepositoryException {
        // TODO: needs complete refactoring

        RepositoryService service = context.getInstance(RepositoryService.class);
        try {
            Connection connection = service.login(credentials, workspaceName);
            return new SessionImpl(context, connection);
        } catch (LoginException e) {
            throw new javax.jcr.LoginException(e.getMessage());
        }
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.