()
| 421 | } |
| 422 | |
| 423 | private String buildURL() { |
| 424 | StringBuilder url = new StringBuilder(oauth2URL + "?client_id=" + Util.encodeUrl(clientId) |
| 425 | + "&redirect_uri=" + Util.encodeUrl(redirectURI)); |
| 426 | if (scope != null) { |
| 427 | url.append("&scope=").append(Util.encodeUrl(scope)); |
| 428 | } |
| 429 | if (clientSecret != null) { |
| 430 | url.append("&response_type=code"); |
| 431 | } else { |
| 432 | url.append("&response_type=token"); |
| 433 | } |
| 434 | |
| 435 | if (additionalParams != null) { |
| 436 | Enumeration e = additionalParams.keys(); |
| 437 | while (e.hasMoreElements()) { |
| 438 | String key = (String) e.nextElement(); |
| 439 | String val = additionalParams.get(key).toString(); |
| 440 | url.append("&").append(Util.encodeUrl(key)).append("=").append(Util.encodeUrl(val)); |
| 441 | } |
| 442 | } |
| 443 | return url.toString(); |
| 444 | } |
| 445 | |
| 446 | private Component createLoginComponent(final ActionListener<ActionEvent> al, final Form frm, final Form backToForm, final Dialog progress) { |
| 447 |
no test coverage detected