File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 4949 clientId : "your-client-id" ,
5050 clientSecret : "your-client-secret" ,
5151 realm : "your-realms" ,
52- appName : "your-app-name"
52+ appName : "your-app-name" ,
53+ scopeSeparator : ","
5354 } ) ;
5455 }
5556
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ var realm;
66var oauth2KeyName ;
77var redirect_uri ;
88var clientSecret ;
9+ var scopeSeparator ;
910
1011function handleLogin ( ) {
1112 var scopes = [ ] ;
@@ -153,7 +154,7 @@ function handleLogin() {
153154 url += '&redirect_uri=' + encodeURIComponent ( redirectUrl ) ;
154155 url += '&realm=' + encodeURIComponent ( realm ) ;
155156 url += '&client_id=' + encodeURIComponent ( clientId ) ;
156- url += '&scope=' + encodeURIComponent ( scopes . join ( ' ' ) ) ;
157+ url += '&scope=' + encodeURIComponent ( scopes . join ( scopeSeparator ) ) ;
157158 url += '&state=' + encodeURIComponent ( state ) ;
158159
159160 window . open ( url ) ;
@@ -188,6 +189,7 @@ function initOAuth(opts) {
188189 clientId = ( o . clientId || errors . push ( 'missing client id' ) ) ;
189190 clientSecret = ( o . clientSecret || errors . push ( 'missing client secret' ) ) ;
190191 realm = ( o . realm || errors . push ( 'missing realm' ) ) ;
192+ scopeSeparator = ( o . scopeSeparator || ' ' ) ;
191193
192194 if ( errors . length > 0 ) {
193195 log ( 'auth unable initialize oauth: ' + errors ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ var realm;
66var oauth2KeyName ;
77var redirect_uri ;
88var clientSecret ;
9+ var scopeSeparator ;
910
1011function handleLogin ( ) {
1112 var scopes = [ ] ;
@@ -153,7 +154,7 @@ function handleLogin() {
153154 url += '&redirect_uri=' + encodeURIComponent ( redirectUrl ) ;
154155 url += '&realm=' + encodeURIComponent ( realm ) ;
155156 url += '&client_id=' + encodeURIComponent ( clientId ) ;
156- url += '&scope=' + encodeURIComponent ( scopes . join ( ' ' ) ) ;
157+ url += '&scope=' + encodeURIComponent ( scopes . join ( scopeSeparator ) ) ;
157158 url += '&state=' + encodeURIComponent ( state ) ;
158159
159160 window . open ( url ) ;
@@ -188,6 +189,7 @@ function initOAuth(opts) {
188189 clientId = ( o . clientId || errors . push ( 'missing client id' ) ) ;
189190 clientSecret = ( o . clientSecret || errors . push ( 'missing client secret' ) ) ;
190191 realm = ( o . realm || errors . push ( 'missing realm' ) ) ;
192+ scopeSeparator = ( o . scopeSeparator || ' ' ) ;
191193
192194 if ( errors . length > 0 ) {
193195 log ( 'auth unable initialize oauth: ' + errors ) ;
Original file line number Diff line number Diff line change 4949 clientId : "your-client-id" ,
5050 clientSecret : "your-client-secret" ,
5151 realm : "your-realms" ,
52- appName : "your-app-name"
52+ appName : "your-app-name" ,
53+ scopeSeparator : ","
5354 } ) ;
5455 }
5556
You can’t perform that action at this time.
0 commit comments