Append swagger-auth global functions to window and don't break backward

This commit is contained in:
Mohsen Azimi
2015-03-16 15:05:42 -07:00
parent 8c6e3a6d95
commit d61cf24ae0
5 changed files with 14 additions and 6 deletions

View File

@@ -202,7 +202,7 @@ function initOAuth(opts) {
});
}
function processOAuthCode(data) {
window.processOAuthCode = function processOAuthCode(data) {
var params = {
'client_id': clientId,
'code': data.code,
@@ -225,7 +225,7 @@ function processOAuthCode(data) {
});
}
function onOAuthComplete(token) {
window.onOAuthComplete = function onOAuthComplete(token) {
if(token) {
if(token.error) {
var checkbox = $('input[type=checkbox],.secured')