Add ability to override redirectUrl in swagger-oauth

Fixes #457
This commit is contained in:
Mohsen Azimi
2015-03-24 10:40:36 -07:00
parent b78a8e5fdc
commit ede1faa0c8
6 changed files with 15 additions and 4 deletions

View File

@@ -32,6 +32,10 @@ window.SwaggerUi = Backbone.Router.extend({
];
}
if (typeof options.redirectUrl === 'string') {
window.oAuthRedirectUrl = options.redirectUrl;
}
// Create an empty div which contains the dom_id
if (! $('#' + this.dom_id).length){
$('body').append('<div id="' + this.dom_id + '"></div>') ;