title: HTTP interceptor: Using url params instead of header for token based auth
body: <p>I have the following code for token based authentication with my backend api in AngularJS:</p>
  
  <pre><code>$httpProvider.interceptors.push(['$q', '$location', '$localStorage', function($q, $location, $localStorage) {
          return {
              'request': function (config) {
                  config.headers = config.headers || {};
                  if ($localStorage.token) {
                      config.headers.Authorization = 'Bearer ' + $localStorage.token;
                  }
                  return config;
              },
              'responseError': function(response) {
                  if(response.status === 401 || response.status === 403) {
                      $location.path('/signin');
                  }
                  return $q.reject(response);
              }
          };
      }]);
  </code></pre>
  
  <p>This sets the "Authorization" header to my token.</p>
  
  <p>How do I have to modify my code to use an URL parameter (named "access_token") instead of an header?</p>