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