updated client lib
This commit is contained in:
2
dist/lib/swagger-client.js
vendored
2
dist/lib/swagger-client.js
vendored
@@ -2822,7 +2822,7 @@ JQueryHttpClient.prototype.execute = function(obj) {
|
|||||||
if(contentType) {
|
if(contentType) {
|
||||||
if(contentType.indexOf("application/json") === 0 || contentType.indexOf("+json") > 0) {
|
if(contentType.indexOf("application/json") === 0 || contentType.indexOf("+json") > 0) {
|
||||||
try {
|
try {
|
||||||
out.obj = response.responseJSON || {};
|
out.obj = response.responseJSON || JSON.parse(out.data) || {};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
// do not set out.obj
|
// do not set out.obj
|
||||||
log("unable to parse JSON content");
|
log("unable to parse JSON content");
|
||||||
|
|||||||
6
dist/lib/swagger-oauth.js
vendored
6
dist/lib/swagger-oauth.js
vendored
@@ -4,6 +4,7 @@ var popupDialog;
|
|||||||
var clientId;
|
var clientId;
|
||||||
var realm;
|
var realm;
|
||||||
var oauth2KeyName;
|
var oauth2KeyName;
|
||||||
|
var redirect_uri;
|
||||||
|
|
||||||
function handleLogin() {
|
function handleLogin() {
|
||||||
var scopes = [];
|
var scopes = [];
|
||||||
@@ -141,6 +142,8 @@ function handleLogin() {
|
|||||||
|
|
||||||
window.enabledScopes=scopes;
|
window.enabledScopes=scopes;
|
||||||
|
|
||||||
|
redirect_uri = redirectUrl;
|
||||||
|
|
||||||
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);
|
||||||
@@ -199,7 +202,8 @@ function processOAuthCode(data) {
|
|||||||
var params = {
|
var params = {
|
||||||
'client_id': clientId,
|
'client_id': clientId,
|
||||||
'code': data.code,
|
'code': data.code,
|
||||||
'grant_type': 'authorization_code'
|
'grant_type': 'authorization_code',
|
||||||
|
'redirect_uri': redirect_uri
|
||||||
}
|
}
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2822,7 +2822,7 @@ JQueryHttpClient.prototype.execute = function(obj) {
|
|||||||
if(contentType) {
|
if(contentType) {
|
||||||
if(contentType.indexOf("application/json") === 0 || contentType.indexOf("+json") > 0) {
|
if(contentType.indexOf("application/json") === 0 || contentType.indexOf("+json") > 0) {
|
||||||
try {
|
try {
|
||||||
out.obj = response.responseJSON || {};
|
out.obj = response.responseJSON || JSON.parse(out.data) || {};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
// do not set out.obj
|
// do not set out.obj
|
||||||
log("unable to parse JSON content");
|
log("unable to parse JSON content");
|
||||||
|
|||||||
Reference in New Issue
Block a user