Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tafax committed Jan 15, 2014
2 parents 2f79bbe + 93ae8d6 commit 185053b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
12 changes: 9 additions & 3 deletions dist/angular-digest-auth.dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AngularJS module to manage HTTP Digest Authentication
* @version v0.1.0 - 2014-01-14
* @version v0.1.2 - 2014-01-15
* @link https://github.com/mgonto/angular-digest-auth
* @author Matteo Tafani Alunno <matteo.tafanialunno@gmail.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -99,6 +99,8 @@ function($rootScope, $authConfig, $authService, $serverAuth, $http)
request.deferred.reject(response);
});
}

$rootScope.requests401 = [];
};

$rootScope.$on($authConfig.getEvent('process.request'), function(event, request)
Expand Down Expand Up @@ -130,7 +132,11 @@ function($rootScope, $authConfig, $authService, $serverAuth, $http)
$rootScope.$on($authConfig.getEvent('credential.submitted'), function(event, credential)
{
console.debug('Submitted credential.');
resendRequests();

if($rootScope.requests401.length == 0)
$authService.signin();
else
resendRequests();
});
}]);
/**
Expand Down Expand Up @@ -520,7 +526,7 @@ function($authConfig, $authStorage, $clientAuth, $rootScope, $http, $cookies, md
*
* @type {Object}
*/
var $identity;
var $identity = null;

/**
* The request used to sing in user.
Expand Down
12 changes: 9 additions & 3 deletions dist/angular-digest-auth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* AngularJS module to manage HTTP Digest Authentication
* @version v0.1.0 - 2014-01-14
* @version v0.1.2 - 2014-01-15
* @link https://github.com/mgonto/angular-digest-auth
* @author Matteo Tafani Alunno <matteo.tafanialunno@gmail.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -99,6 +99,8 @@ function($rootScope, $authConfig, $authService, $serverAuth, $http)
request.deferred.reject(response);
});
}

$rootScope.requests401 = [];
};

$rootScope.$on($authConfig.getEvent('process.request'), function(event, request)
Expand Down Expand Up @@ -130,7 +132,11 @@ function($rootScope, $authConfig, $authService, $serverAuth, $http)
$rootScope.$on($authConfig.getEvent('credential.submitted'), function(event, credential)
{

resendRequests();

if($rootScope.requests401.length == 0)
$authService.signin();
else
resendRequests();
});
}]);
/**
Expand Down Expand Up @@ -520,7 +526,7 @@ function($authConfig, $authStorage, $clientAuth, $rootScope, $http, $cookies, md
*
* @type {Object}
*/
var $identity;
var $identity = null;

/**
* The request used to sing in user.
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-digest-auth.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 185053b

Please sign in to comment.