0

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

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.