Skip to content

Commit

Permalink
WEB: OAuth more flexible. It now has no fixed url, oauth server is ga…
Browse files Browse the repository at this point in the history
…teway server now.
  • Loading branch information
thomasletsch committed Feb 17, 2016
1 parent 138b667 commit 033c94f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gui/inventory-web/app/src/authentication/LoginController.js
Expand Up @@ -29,7 +29,8 @@ function LoginController($log, $http, $state, $scope, StructureService, Authenti
$scope.$on('oauth:denied', function(event) {
$log.debug('The user did not authorize the third party app');
AuthenticationService.logout();
window.location = "http://localhost:8899/uaa/oauth/authorize?response_type=token&client_id=web&redirect_uri=http://localhost:8765/web/index.html"
var baseUrl = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port;
window.location = baseUrl + "/uaa/oauth/authorize?response_type=token&client_id=web&redirect_uri=" + window.location;
});

$scope.$on('oauth:expired', function(event) {
Expand Down

0 comments on commit 033c94f

Please sign in to comment.