Examples of verifyAccountExists()


Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

                .retrieve(AccountManagement.class);

        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user1@vysper.org"))) {
            accountManagement.addUser("user1@vysper.org", "password1");
        }
        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user2@vysper.org"))) {
            accountManagement.addUser("user2@vysper.org", "password1");
        }
        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user3@vysper.org"))) {
            accountManagement.addUser("user3@vysper.org", "password1");
        }
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

            accountManagement.addUser("user1@vysper.org", "password1");
        }
        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user2@vysper.org"))) {
            accountManagement.addUser("user2@vysper.org", "password1");
        }
        if (!accountManagement.verifyAccountExists(EntityImpl.parse("user3@vysper.org"))) {
            accountManagement.addUser("user3@vysper.org", "password1");
        }

        XMPPServer server = new XMPPServer("vysper.org");
        server.addEndpoint(new TCPEndpoint());
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

        if (accountManagement == null)
            throw new IllegalStateException("no account manager accessible.");

        for (String user : userPasswordMap.keySet()) {
            Entity entity = EntityImpl.parse(user);
            if (!accountManagement.verifyAccountExists(entity)) {
                String password = userPasswordMap.get(user);
                if (StringUtils.isEmpty(password)) {
                    password = RandomStringUtils.randomAlphanumeric(8);
                    System.out.println(user + " user will be added with random password: '" + password + "'");
                }
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

        StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
        final AccountManagement accountManagement = (AccountManagement) providerRegistry
        .retrieve(AccountManagement.class);

        if (!accountManagement.verifyAccountExists(localUser)) {
            accountManagement.addUser(localUser, "password1");
        }

        // S2S endpoint
        server.addEndpoint(new S2SEndpoint());
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

        final Entity adminJID = EntityImpl.parseUnchecked("admin@" + domain);
        final AccountManagement accountManagement = (AccountManagement) providerRegistry
                .retrieve(AccountManagement.class);

        String initialPassword = System.getProperty("vysper.admin.initial.password", "CHOOSE SECURE PASSWORD");
        if (!accountManagement.verifyAccountExists(adminJID)) {
            accountManagement.addUser(adminJID, initialPassword);
        }

        XMPPServer server = new XMPPServer(domain);
        server.addEndpoint(new TCPEndpoint());
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

        final AccountManagement accountManagement = (AccountManagement) providerRegistry
                .retrieve(AccountManagement.class);

        Entity user1 = EntityImpl.parse("user1@vysper.org");
        if (!accountManagement.verifyAccountExists(user1)) {
            accountManagement.addUser(user1, "password1");
        }
        Entity user2 = EntityImpl.parse("user2@vysper.org");
        if (!accountManagement.verifyAccountExists(user2)) {
            accountManagement.addUser(user2, "password1");
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

        Entity user1 = EntityImpl.parse("user1@vysper.org");
        if (!accountManagement.verifyAccountExists(user1)) {
            accountManagement.addUser(user1, "password1");
        }
        Entity user2 = EntityImpl.parse("user2@vysper.org");
        if (!accountManagement.verifyAccountExists(user2)) {
            accountManagement.addUser(user2, "password1");
        }
        Entity user3 = EntityImpl.parse("user3@vysper.org");
        if (!accountManagement.verifyAccountExists(user3)) {
            accountManagement.addUser(user3, "password1");
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

        Entity user2 = EntityImpl.parse("user2@vysper.org");
        if (!accountManagement.verifyAccountExists(user2)) {
            accountManagement.addUser(user2, "password1");
        }
        Entity user3 = EntityImpl.parse("user3@vysper.org");
        if (!accountManagement.verifyAccountExists(user3)) {
            accountManagement.addUser(user3, "password1");
        }

        XMPPServer server = new XMPPServer("vysper.org");
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

                } else {
                    user = EntityImpl.parse(username + "@" + serverRuntimeContext.getServerEnitity());
                }
               
                if(sessionContext.getState().equals(SessionState.AUTHENTICATED)) {
                    if(accountManagement.verifyAccountExists(user)) {
                        // account exists
                        accountManagement.changePassword(user, password);
                    } else {
                        throw new AccountCreationException("Account does not exist");
                    }
View Full Code Here

Examples of org.apache.vysper.xmpp.authorization.AccountManagement.verifyAccountExists()

                        accountManagement.changePassword(user, password);
                    } else {
                        throw new AccountCreationException("Account does not exist");
                    }
                } else {
                    if(accountManagement.verifyAccountExists(user)) {
                        // account exists
                        throw new AccountCreationException("Account already exists");
                    } else {
                        accountManagement.addUser(user, password);
                    }
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.