0
I saw that to set the 'Authorization' field of the header with Angular is used:
$http.defaults.headers.common.Authorization = "Bearer " + token
or
$http.defaults.headers.common.Authorization = "Basic " + token
What is the difference between 'Bearer' and 'Basic'? And why when I request via Postman do not need to concatenate the token with either?
In Postman, Seto in header tab only the 'Authorization' token'
– Hamurabi Araujo
I don’t think we understand, I use the "Headers" tab of Postman, not the "Authorization" tab. And in the "Headers" tab I have to put the "key" Authorization and in the "value" I have to put "Bearer token" ( Bearer "space" token)
– seeAlex
Exactly what you said: In the "Headers" tab, I put in the key 'Authorization' with the value 'token' [without bearer] and return me normal.
– Hamurabi Araujo
Do you have access to the server? Bearer is defined by the Oauth2 specification can be some configuration in the application that makes you get access even without putting the Bearer in front of the token.
– seeAlex
I do, but I think now you killed the question. Because probably the application has not been developed using the Oauth standard.
– Hamurabi Araujo