Merge pull request #983 from mohsen1/CatLabInteractive-master

Cat lab interactive master
This commit is contained in:
Tony Tam
2015-03-02 10:25:49 -08:00
2 changed files with 20 additions and 12 deletions

View File

@@ -140,6 +140,9 @@ function handleLogin() {
scopes.push(scope); scopes.push(scope);
} }
// Implicit auth recommends a state parameter.
var state = Math.random ();
window.enabledScopes=scopes; window.enabledScopes=scopes;
redirect_uri = redirectUrl; redirect_uri = redirectUrl;
@@ -148,6 +151,7 @@ function handleLogin() {
url += '&realm=' + encodeURIComponent(realm); url += '&realm=' + encodeURIComponent(realm);
url += '&client_id=' + encodeURIComponent(clientId); url += '&client_id=' + encodeURIComponent(clientId);
url += '&scope=' + encodeURIComponent(scopes.join(' ')); url += '&scope=' + encodeURIComponent(scopes.join(' '));
url += '&state=' + encodeURIComponent(state);
window.open(url); window.open(url);
}); });

View File

@@ -140,6 +140,9 @@ function handleLogin() {
scopes.push(scope); scopes.push(scope);
} }
// Implicit auth recommends a state parameter.
var state = Math.random ();
window.enabledScopes=scopes; window.enabledScopes=scopes;
redirect_uri = redirectUrl; redirect_uri = redirectUrl;
@@ -148,6 +151,7 @@ function handleLogin() {
url += '&realm=' + encodeURIComponent(realm); url += '&realm=' + encodeURIComponent(realm);
url += '&client_id=' + encodeURIComponent(clientId); url += '&client_id=' + encodeURIComponent(clientId);
url += '&scope=' + encodeURIComponent(scopes.join(' ')); url += '&scope=' + encodeURIComponent(scopes.join(' '));
url += '&state=' + encodeURIComponent(state);
window.open(url); window.open(url);
}); });