Examples of OAuthDataMessage


Examples of com.box.boxjavalibv2.authorization.OAuthDataMessage

                final IBoxOAuthManager oAuthManager = boxClient.getOAuthManager();
                final BoxOAuthToken oAuthToken = oAuthManager.createOAuth(authorizationCode,
                    configuration.getClientId(), configuration.getClientSecret(), null);

                // send initial token to BoxClient and this.listener
                final OAuthDataMessage authDataMessage = new OAuthDataMessage(oAuthToken,
                    boxClient.getJSONParser(), boxClient.getResourceHub());
                listener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, authDataMessage);
                this.listener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, authDataMessage);
            }
View Full Code Here

Examples of com.box.boxjavalibv2.authorization.OAuthDataMessage

                final IBoxOAuthManager oAuthManager = boxClient.getOAuthManager();
                final BoxOAuthToken oAuthToken = oAuthManager.createOAuth(authorizationCode,
                    configuration.getClientId(), configuration.getClientSecret(), null);

                // send initial token to BoxClient and this.listener
                final OAuthDataMessage authDataMessage = new OAuthDataMessage(oAuthToken,
                    boxClient.getJSONParser(), boxClient.getResourceHub());
                listener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, authDataMessage);
                this.listener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, authDataMessage);
            }
View Full Code Here

Examples of com.box.boxjavalibv2.authorization.OAuthDataMessage

            }

            @Override
            public void onAuthFlowEvent(IAuthEvent state, IAuthFlowMessage message) {
                if (state == OAuthEvent.OAUTH_CREATED) {
                    OAuthDataMessage msg = (OAuthDataMessage) message;
                    final String display = "tokens: " + msg.getData().getAccessToken() + ","
                        + msg.getData().getRefreshToken();
                    // Note this event is fired on javafx thread, if your app is like this sample trying to do something
                    // on java swing thread on receiving the message, you need to use SwingUtilities.invokeLater.
                    SwingUtilities.invokeLater(new Runnable() {

                        @Override
View Full Code Here

Examples of com.box.boxjavalibv2.authorization.OAuthDataMessage

            @Override
            public void run() {
                try {
                    oauthListener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED,
                        new OAuthDataMessage(token, client.getJSONParser(), client.getResourceHub()));
                } catch (Exception e) {
                    oauthListener.onAuthFlowException(e);
                }
                Platform.exit();
            }
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.