* limitations under the License.
* ============LICENSE_END============================================
* ===================================================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
'use strict';
-function AuthenticateCtrl($scope, $rootScope, $window, $resource, $http, $location, $cookies, md5) {
+function AuthenticateCtrl($scope, $rootScope, $window, $resource, $http, $location, $cookies) {
console.log("//////////AuthenticateCtrl");
$scope.getInclude = function() {
console.log("getInclude011111111");
$window.localStorage.setItem("isInvalidUser", true);
return;
}
- var hashpass = md5.createHash(pass);
var headers = username ? {
authorization: "Basic " +
- btoa(username + ":" + hashpass)
+ btoa(username + ":" + pass)
} : {};
// send request to a test API with the username/password to verify the authorization
$http.get('/restservices/clds/v1/user/testUser', {
callback && callback();
});
};
+
+ $scope.logout = function() {
+ window.localStorage.removeItem("isAuth");
+ window.localStorage.removeItem("loginuser");
+ };
}