merged from auth_2.0 branch

This commit is contained in:
Tony Tam
2014-11-11 00:16:13 -08:00
parent 8e20a32344
commit 329772af4c
11 changed files with 168 additions and 355 deletions

View File

@@ -389,6 +389,9 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
this.produces = response.produces;
this.securityDefinitions = response.securityDefinitions;
// legacy support
this.authSchemes = response.securityDefinitions;
var location = this.parseUri(this.url);
if(typeof this.schemes === 'undefined' || this.schemes.length === 0) {
this.scheme = location.scheme;