title: how to call camunda rest api from angularJs 1.5.0 and provide basic authentication
body: <p>I am new bee to camunda and angular. I want to access a camunda Rest api service in my angular application. and want to provide basic authentication on login..i try with different approach.but fail got CORS error,401 404 unauthorized errors<br>
  this is a call</p>
  
  <pre><code> $http.post('http://192.168.100.107:8080/engine-rest',
                      { username: username, password: password })
                          .then(function successCallback(response) {
                              console.log(response);
                              console.log(JSON.stringify(response));
                              //callback(response);
                          // this callback will be called asynchronously
                          // when the response is available
                          }, function errorCallback(response) {
                              console.log(response);
                              console.log(JSON.stringify(response));
                              //callback(response);
                          // called asynchronously if an error occurs
                          // or server returns response with  
  
                          });
  </code></pre>
  
  <hr>
  
  <p>this is the cors filter added in camunda server engine-rest</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;CacheControlFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.camunda.bpm.engine.rest.filter.CacheControlFilter&lt;/filter-class&gt;    
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;CacheControlFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
  
    &lt;!-- Http Basic Authentication Filter --&gt;
     &lt;filter&gt;
      &lt;filter-name&gt;camunda-auth&lt;/filter-name&gt;
      &lt;filter-class&gt;
        org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter
      &lt;/filter-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;authentication-provider&lt;/param-name&gt;
        &lt;param-value&gt;org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;rest-url-pattern-prefix&lt;/param-name&gt;
          &lt;param-value&gt;&lt;/param-value&gt;
        &lt;/init-param&gt; 
    &lt;/filter&gt;
  </code></pre>