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
Post a Comment