Examples of BoxOAuthToken


Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

                // get authorization code
                final String authorizationCode = params.get("code");

                // get OAuth token
                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());
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

                if (ObjectHelper.isEmpty(refreshToken)) {
                    return null;
                } else {
                    Map<String, Object> values = new HashMap<String, Object>();
                    values.put(BoxOAuthToken.FIELD_REFRESH_TOKEN, refreshToken);
                    return new BoxOAuthToken(values);
                }
            }
        });
        configuration.setRefreshListener(new OAuthRefreshListener() {
            @Override
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

                // get authorization code
                final String authorizationCode = params.get("code");

                // get OAuth token
                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());
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

     *
     * @return string
     * @throws AuthFatalFailureException
     */
    private String getAuthString() throws AuthFatalFailureException {
        BoxOAuthToken data = mOAuth.getAuthData();
        return BEARER + " " + data.getAccessToken();
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

        Thread t = new Thread() {

            @Override
            public void run() {
                BoxOAuthToken oauth = null;
                try {
                    oauth = client.getOAuthManager().createOAuth(code, mWebViewData.getClientId(),
                        mWebViewData.getClientSecret(), mWebViewData.getRedirectUrl());
                    exitSuccess(oauth);
                } catch (Exception e) {
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

     * @return string
     * @throws AuthFatalFailureException
     */
    private String getAuthString() throws AuthFatalFailureException {
        if (mOAuth != null) {
            BoxOAuthToken data = mOAuth.guaranteedGetAuthData();
            if (data != null) {
                return BEARER + " " + data.getAccessToken();
            }
        }
        return "";

    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxOAuthToken

    }

    private BoxOAuthToken createMockToken(String accessToken) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("access_token", accessToken);
        return new BoxOAuthToken(map);
    }
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.