angularjs - How to remove header authentication while logout? -


hi using header authentication web service call os working fine.

$http.defaults.headers.common['authorization'] = 'basic ' + base64.encode(username + ':' + password);       $http({method: 'get', url: url}).           success(function(data) {               if(data=='' || data==null || data=='undefined'){                   var alertpopup = $ionicpopup.alert({                       title: 'info!',                       template: 'invalid password, or no user found email address'                   });                   alertpopup.then(function(res) {                       console.log('invalid password, or no user found email address ');                   }); 

problem if logged out , try login different username or password getting logged in first logged in user .how remove header authentication while logout?

did try adding

$http.defaults.headers.common['authorization'] = '' 

to logout call?

cheers


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -