File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var clientId;
55var realm ;
66var oauth2KeyName ;
77var redirect_uri ;
8+ var scopeSeparator ;
89
910function handleLogin ( ) {
1011 var scopes = [ ] ;
@@ -151,7 +152,7 @@ function handleLogin() {
151152 url += '&redirect_uri=' + encodeURIComponent ( redirectUrl ) ;
152153 url += '&realm=' + encodeURIComponent ( realm ) ;
153154 url += '&client_id=' + encodeURIComponent ( clientId ) ;
154- url += '&scope=' + encodeURIComponent ( scopes . join ( ' ' ) ) ;
155+ url += '&scope=' + encodeURIComponent ( scopes . join ( scopeSeparator ) ) ;
155156 url += '&state=' + encodeURIComponent ( state ) ;
156157
157158 window . open ( url ) ;
@@ -185,6 +186,7 @@ function initOAuth(opts) {
185186 popupDialog = ( o . popupDialog || $ ( '.api-popup-dialog' ) ) ;
186187 clientId = ( o . clientId || errors . push ( 'missing client id' ) ) ;
187188 realm = ( o . realm || errors . push ( 'missing realm' ) ) ;
189+ scopeSeparator = ( o . scopeSeparator || ' ' ) ;
188190
189191 if ( errors . length > 0 ) {
190192 log ( 'auth unable initialize oauth: ' + errors ) ;
Original file line number Diff line number Diff line change 3838 initOAuth ( {
3939 clientId : "your-client-id" ,
4040 realm : "your-realms" ,
41- appName : "your-app-name"
41+ appName : "your-app-name" ,
42+ scopeSeparator : ","
4243 } ) ;
4344 }
4445
You can’t perform that action at this time.
0 commit comments