You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2019/01/16 02:11:55 UTC
[brooklyn-server] 15/49: correct redirect url
This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
commit 41a7a90f0387e7129f9f00264a0bb39c55a41b27
Author: frogfather <j....@icloud.com>
AuthorDate: Fri Dec 7 15:32:31 2018 +0000
correct redirect url
---
.../apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java
index 3b23fc8..9a187ef 100644
--- a/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java
+++ b/rest/rest-resources/src/main/java/org/apache/brooklyn/rest/security/jaas/GoogleOauthLoginModule.java
@@ -317,11 +317,11 @@ public class GoogleOauthLoginModule implements LoginModule {
private boolean redirectLogin() throws IOException {
String state=createRandomHexString(16); //should be stored in session
StringBuilder oauthUrl = new StringBuilder().append(authoriseURL)
- .append("response_type=").append("code")
- .append("?client_id=").append(clientId) // the client id from the api console registration
+ .append("?response_type=").append("code")
+ .append("&client_id=").append(clientId) // the client id from the api console registration
.append("&redirect_uri=").append(callbackUri) // the servlet that github redirects to after
// authorization
- .append("scope=").append("user public_repo")
+ .append("&scope=").append("user public_repo")
.append("&state=").append(state)
.append("&access_type=offline") // here we are asking to access to user's data while they are not
// signed in