code: public void update( JSONObject json )
      {
          accessToken = json.getString( ACCESS_TOKEN );
          tokenType = json.getString( TOKEN_TYPE );
          expiresAt = calculateExpiresAt( json );
          if ( json.has( OAuth2.REFRESH_TOKEN ) ) {
              refreshToken = json.getString( OAuth2.REFRESH_TOKEN );
          }
      }
docs: Update the credentials from a JSON request response.
  
  @param json The JSON object containing the values to update