Skip to content

Commit 83afb5b

Browse files
committed
rebuilt
2 parents 840ec90 + 66a049c commit 83afb5b

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

dist/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
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

dist/lib/swagger-oauth.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var realm;
66
var oauth2KeyName;
77
var redirect_uri;
88
var clientSecret;
9+
var scopeSeparator;
910

1011
function 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);

lib/swagger-oauth.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var realm;
66
var oauth2KeyName;
77
var redirect_uri;
88
var clientSecret;
9+
var scopeSeparator;
910

1011
function 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);

src/main/html/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
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

0 commit comments

Comments
 (0)