Package com.fitbit.api.client.http

Examples of com.fitbit.api.client.http.TempCredentials


    }

    public String getResourceOwnerAuthorizationURL(LocalUserDetail user, String callbackURL) throws FitbitAPIException {
        // Get temporary credentials. Include callback URL which the Fitbit API service will save and redirect to when
        // the user authorizes.
        TempCredentials tempCredentials = client.getOAuthTempToken(callbackURL);
        // Create and save temporary resource credentials:
        APIResourceCredentials resourceCredentials = new APIResourceCredentials(user.getUserId(), tempCredentials.getToken(), tempCredentials.getTokenSecret());
        saveResourceCredentials(user, resourceCredentials);
        // Return Fitbit URL to redirect to where the user can authorize:
        return tempCredentials.getAuthorizationURL();
    }
View Full Code Here

TOP

Related Classes of com.fitbit.api.client.http.TempCredentials

Copyright © 2018 www.massapicom. 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.