Skip to content

Commit

Permalink
Fixing problems with sign in when doing SSO.
Browse files Browse the repository at this point in the history
  • Loading branch information
longdogz committed Jul 27, 2017
1 parent be9fd07 commit f6dc7f2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/ui/app/scripts/controllers/SignInCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,11 @@ angular.module('wasabi.controllers')
// In the case where we are doing an SSO login, we expect the backend to have extracted
// the user's credentials and to return their username to us, since we need that for
// authorization.
var username = (ConfigFactory.authnType() === 'sso' ? result.username : credentials.username);
var username = (ConfigFactory.authnType() === 'sso' ? result.access_token : credentials.username);
var sessionInfo = {userID: username, accessToken: result.access_token, tokenType: result.token_type};
Session.create(sessionInfo);

if (ConfigFactory.authnType() !== 'sso') {
result.username = credentials.username;
}
result.username = username;
UtilitiesFactory.getPermissions(result, $scope.transitionToFirstPage);
}, function(reason) {
if (reason.data.error && reason.data.error.code !== 401) {
Expand Down Expand Up @@ -131,4 +129,4 @@ angular.module('wasabi.controllers')
}]);


/*jshint +W106*/ // re-enable camel case warning
/*jshint +W106*/ // re-enable camel case warning

0 comments on commit f6dc7f2

Please sign in to comment.