package org.oauth2.client4j.http.response;
import org.oauth2.client4j.exception.OAuthException;
import org.oauth2.client4j.model.GoogleToken;
import com.alibaba.fastjson.JSONObject;
public class GoogleAccessTokenResponse extends OAuthResponse
{
private GoogleToken googleToken;
@Override
public void setBody(String body)
{
super.setBody(body);
googleToken = JSONObject.parseObject(this.body, GoogleToken.class);
if (null == googleToken.getAccess_token())
{
throw new OAuthException(body);
}
}
public GoogleToken getGoogleToken()
{
return googleToken;
}
}