@Override public String getProfileUrl( final OAuth2AccessToken accessToken, final OAuth20Configuration configuration) { final OkClient client = (OkClient) configuration.getClient(); String baseParams = "application_key=" + client.getPublicKey() + "&format=json" + "&method=users.getCurrentUser"; String finalSign; try { String preSign = getMD5SignAsHexString(accessToken.getAccessToken() + configuration.getSecret()); finalSign = getMD5SignAsHexString(baseParams.replaceAll("&", "") + preSign); } catch (Exception e) { logger.error(e.getMessage()); return null; } return API_BASE_URL + baseParams + "&access_token=" + accessToken.getAccessToken() + "&sig=" + finalSign; }
public void setSecret(final String secret) { configuration.setSecret(secret); }
public void setKey(final String key) { configuration.setKey(key); }
public String getSecret() { return configuration.getSecret(); }
public String getKey() { return configuration.getKey(); }