function loginSuccessFn(data, status, headers, config) {
Authentication.setAuthenticatedAccount(data.data);
//window.location = '/';
return $http.post('https://ap-codereview.us.oracle.com/api/json/accounts/login',
{'Authorization': 'Basic ' + $base64.encode('username:password')}).then(codereviewSuccessFn, codereviewErrorFn);
}
I am trying basic authentication using the $http service and I keep getting this message.
No 'Access-Control-Allow-Origin' header is present on the requested resource
How can I successfully implement basic auth in angularjs. I tried reading up some examples but I do not understand how to configure Access-Control-Allow-Origin in the http header.
I am a total newbie at authentication and would appreciate any help.