We have a simple auth2 applciation (like this) that works, when called from CURL, but we have a problem getting the token from angular http
So the question is: what is the equivalent of this curl in angular:
curl -H "Accept: application/json" my-client-with-secret:secret@localhost:8080/oauth/token -d grant_type=client_credentials
We tried to set the Authorization
header
$http.defaults.headers.common['Authorization'] = "Basic <'secret:secret' in Base64>";
but we got 401 unauthorized