// String userJson = getRestTemplate().getForObject(getUrl("/v2/users/{guid}"), String.class, user);
// Map<String, Object> userInfo = (Map<String, Object>) JsonUtil.convertJsonToMap(userJson);
// return userInfo();
//TODO: remove this temporary hack once the /v2/users/ uri can be accessed by mere mortals
String userJson = "{}";
OAuth2AccessToken accessToken = oauthClient.getToken();
if (accessToken != null) {
String tokenString = accessToken.getValue();
int x = tokenString.indexOf('.');
int y = tokenString.indexOf('.', x + 1);
String encodedString = tokenString.substring(x + 1, y);
try {
byte[] decodedBytes = new sun.misc.BASE64Decoder().decodeBuffer(encodedString);