the "scope" param of launchInBrowser function in dailymotion sample is not used. #39
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
From me@sunchangming.com on May 16, 2012 22:53:54
Version of google-oauth-java-client (e.g. 1.5.0-beta)? trunk Java environment (e.g. Java 6, Android 2.3, App Engine)? java 6 Describe the problem. package: com.google.api.services.samples.dailymotion.cmd
file: lineDailyMotionSample.java
private static void launchInBrowser(
String browser, String redirectUrl, String clientId, String scope) throws IOException {
String authorizationUrl = new AuthorizationCodeRequestUrl(
AUTHORIZATION_SERVER_URL, clientId).setRedirectUri(redirectUrl).build();
if (Desktop.isDesktopSupported()) {
Desktop desktop = Desktop.getDesktop();
if (desktop.isSupported(Action.BROWSE)) {
desktop.browse(URI.create(authorizationUrl));
return;
}
}
if (browser != null) {
Runtime.getRuntime().exec(new String[] {browser, authorizationUrl});
} else {
System.out.println("Open the following address in your favorite browser:");
System.out.println(" " + authorizationUrl);
}
}
Scope is not passed to redirect url. How would you expect it to be fixed? String authorizationUrl = new AuthorizationCodeRequestUrl(
AUTHORIZATION_SERVER_URL, clientId).setRedirectUri(redirectUrl).setScopes(scope).build();
Or, please remove this param.
Original issue: http://code.google.com/p/google-oauth-java-client/issues/detail?id=39
The text was updated successfully, but these errors were encountered: