Package com.fitbit.api

Examples of com.fitbit.api.FitbitAPISecurityException


    }

    public void evictUpdatedResourcesFromCache(String subscriberId, InputStream updateMessageStream, String serverSignature) throws FitbitAPIException {
        try {
            if (null == serverSignature) {
                throw new FitbitAPISecurityException("Missing signature.");
            }

            String updateMessage = APIUtil.inputStreamToString(updateMessageStream);

            String ourSignature = APIUtil.generateSignature(updateMessage, subscriberSecret);
            if (null == ourSignature || !ourSignature.equals(serverSignature)) {
                throw new FitbitAPISecurityException("Signatures do not match, given " + serverSignature);
            }

            UpdateNotification notification = new UpdateNotification(new JSONArray(updateMessage));

            int i = 0;
View Full Code Here

TOP

Related Classes of com.fitbit.api.FitbitAPISecurityException

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.