rebuilt
This commit is contained in:
3
dist/index.html
vendored
3
dist/index.html
vendored
@@ -49,7 +49,8 @@
|
||||
clientId: "your-client-id",
|
||||
clientSecret: "your-client-secret",
|
||||
realm: "your-realms",
|
||||
appName: "your-app-name"
|
||||
appName: "your-app-name",
|
||||
scopeSeparator: ","
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
4
dist/lib/swagger-oauth.js
vendored
4
dist/lib/swagger-oauth.js
vendored
@@ -6,6 +6,7 @@ var realm;
|
||||
var oauth2KeyName;
|
||||
var redirect_uri;
|
||||
var clientSecret;
|
||||
var scopeSeparator;
|
||||
|
||||
function handleLogin() {
|
||||
var scopes = [];
|
||||
@@ -153,7 +154,7 @@ function handleLogin() {
|
||||
url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
|
||||
url += '&realm=' + encodeURIComponent(realm);
|
||||
url += '&client_id=' + encodeURIComponent(clientId);
|
||||
url += '&scope=' + encodeURIComponent(scopes.join(' '));
|
||||
url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator));
|
||||
url += '&state=' + encodeURIComponent(state);
|
||||
|
||||
window.open(url);
|
||||
@@ -188,6 +189,7 @@ function initOAuth(opts) {
|
||||
clientId = (o.clientId||errors.push('missing client id'));
|
||||
clientSecret = (o.clientSecret||errors.push('missing client secret'));
|
||||
realm = (o.realm||errors.push('missing realm'));
|
||||
scopeSeparator = (o.scopeSeparator||' ');
|
||||
|
||||
if(errors.length > 0){
|
||||
log('auth unable initialize oauth: ' + errors);
|
||||
|
||||
@@ -6,6 +6,7 @@ var realm;
|
||||
var oauth2KeyName;
|
||||
var redirect_uri;
|
||||
var clientSecret;
|
||||
var scopeSeparator;
|
||||
|
||||
function handleLogin() {
|
||||
var scopes = [];
|
||||
@@ -153,7 +154,7 @@ function handleLogin() {
|
||||
url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
|
||||
url += '&realm=' + encodeURIComponent(realm);
|
||||
url += '&client_id=' + encodeURIComponent(clientId);
|
||||
url += '&scope=' + encodeURIComponent(scopes.join(' '));
|
||||
url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator));
|
||||
url += '&state=' + encodeURIComponent(state);
|
||||
|
||||
window.open(url);
|
||||
@@ -188,6 +189,7 @@ function initOAuth(opts) {
|
||||
clientId = (o.clientId||errors.push('missing client id'));
|
||||
clientSecret = (o.clientSecret||errors.push('missing client secret'));
|
||||
realm = (o.realm||errors.push('missing realm'));
|
||||
scopeSeparator = (o.scopeSeparator||' ');
|
||||
|
||||
if(errors.length > 0){
|
||||
log('auth unable initialize oauth: ' + errors);
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
clientId: "your-client-id",
|
||||
clientSecret: "your-client-secret",
|
||||
realm: "your-realms",
|
||||
appName: "your-app-name"
|
||||
appName: "your-app-name",
|
||||
scopeSeparator: ","
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user