Package com.box.boxjavalibv2

Examples of com.box.boxjavalibv2.BoxClient.authenticate()


                LOG.debug("Using OAuth {}", cachedBoxClient);
                // authorize App for user, and create OAuth token with refresh token
                final IAuthFlowUI authFlowUI = new LoginAuthFlowUI(configuration, boxClient);
                final CountDownLatch latch = new CountDownLatch(1);
                final LoginAuthFlowListener listener = new LoginAuthFlowListener(latch);
                boxClient.authenticate(authFlowUI, true, listener);

                // wait for login to finish or timeout
                if (!latch.await(configuration.getLoginTimeout(), TimeUnit.SECONDS)) {
                    if (!boxClient.isAuthenticated()) {
                        throw new RuntimeCamelException(String.format("Login timeout for %s", cachedBoxClient));
View Full Code Here


                LOG.debug("Using OAuth {}", cachedBoxClient);
                // authorize App for user, and create OAuth token with refresh token
                final IAuthFlowUI authFlowUI = new LoginAuthFlowUI(configuration, boxClient);
                final CountDownLatch latch = new CountDownLatch(1);
                final LoginAuthFlowListener listener = new LoginAuthFlowListener(latch);
                boxClient.authenticate(authFlowUI, true, listener);

                // wait for login to finish or timeout
                if (!latch.await(configuration.getLoginTimeout(), TimeUnit.SECONDS)) {
                    if (!boxClient.isAuthenticated()) {
                        throw new RuntimeCamelException(String.format("Login timeout for %s", cachedBoxClient));
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.