<commit_before>'use strict';

var tube = angular.module("tube");

tube.factory('tokenFactory', ['$http', '$cookies', 'base64', 'servicesConfig', function($http, $cookies, base64, servicesConfig) {

  $http.defaults.headers.common.Authorization = 'Basic ' + base64.encode('democlient:NDFkZGJjMDUtNzJmNi00');

  return {
    getToken: function(email, password){
      return $http.get(servicesConfig.demoService + "/token?grant_type=password&scope=*,scope://qcasting/_demo&email="+email+"&password="+password);
    },
    getAccessToken: function(){
      // return $cookies.token_access_token;
      return $cookies.access_token;
    }
  };

}]);<commit_msg>Update get access token method from cookies<commit_after>'use strict';

var tube = angular.module("tube");

tube.factory('tokenFactory', ['$http', '$cookies', 'base64', 'servicesConfig', function($http, $cookies, base64, servicesConfig) {

  $http.defaults.headers.common.Authorization = 'Basic ' + base64.encode('democlient:NDFkZGJjMDUtNzJmNi00');

  return {
    getToken: function(email, password){
      return $http.get(servicesConfig.demoService + "/token?grant_type=password&scope=*,scope://qcasting/_demo&email="+email+"&password="+password);
    },
    getAccessToken: function(){
      return $cookies.access_token || $cookies.token_access_token;
    }
  };

}]);
{'fraction_non_alphanumeric': 0.16917293233082706, 'fraction_numerical': 0.012030075187969926, 'mean_word_length': 5.5245098039215685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3585873', 'n_tokens_mistral': 441, 'n_tokens_neox': 422, 'n_words': 65}