Skip to content

Commit

Permalink
Merge pull request #71 from alexweltman/3.2.3_GetTokenFromHeader
Browse files Browse the repository at this point in the history
kibana now grabs response token from header instead of body
  • Loading branch information
craig-cogdill authored Nov 17, 2016
2 parents 47c90a2 + c51c3fe commit f7ef6b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kibana/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ define(function (require) {
});
RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
if (data && data.status === 'success') {
if (data.token) {
localStorage.setItem('token', data.token);
if (response.headers('Token')) {
localStorage.setItem('token', response.headers('Token'));
}
return data.data;
} else {
Expand Down

0 comments on commit f7ef6b6

Please sign in to comment.