// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package org.apache.oltu.oauth2.client.response; import org.apache.oltu.oauth2.common.exception.OAuthProblemException; import org.apache.oltu.oauth2.common.token.BasicOAuthToken; import org.apache.oltu.oauth2.common.token.OAuthToken; import org.apache.oltu.oauth2.common.utils.JSONUtils; // Referenced classes of package org.apache.oltu.oauth2.client.response: // OAuthAccessTokenResponse public class OAuthJSONAccessTokenResponse extends OAuthAccessTokenResponse { public OAuthJSONAccessTokenResponse() { } public String getAccessToken() { return getParam("access_token"); } public Long getExpiresIn() { String s = getParam("expires_in"); if (s == null) { return null; } else { return Long.valueOf(s); } } public OAuthToken getOAuthToken() { return new BasicOAuthToken(getAccessToken(), getExpiresIn(), getRefreshToken(), getScope()); } public String getRefreshToken() { return getParam("refresh_token"); } public String getScope() { return getParam("scope"); } protected void setBody(String s) throws OAuthProblemException { try { body = s; parameters = JSONUtils.parseJSON(s); return; } // Misplaced declaration of an exception variable catch (String s) { throw OAuthProblemException.error("unsupported_response_type", "Invalid response! Response body is not application/json encoded"); } } protected void setContentType(String s) { contentType = s; } protected void setResponseCode(int i) { responseCode = i; } }