I currently have a very simple rest api, wich allows user authentication through basic security. My angular client receives email and password from a login input, and gets the user from the server. email and password are sent in the http headers. The problem is, when my securityfilter (JAX-rs java, jersey backend impl) i get that my auth headers are empty.
Am i sending them empty from angular??
getSecuredUser(email: string, password: string){
let headers: Headers = new Headers();
headers.append("Authorization", "Basic " + email + ":" + password);
headers.append("'Access-Control-Allow-Origin': '*' ", "application/x-www-form-urlencoded");
return this.http.get(DEFAULT_PATH + 'users/' + email, headers).subscribe(
(data: Response) => {
var result = data.json();
return result;
}
);
}