Reputation: 11
I have added Spring Security in my project. It's working fine when I am requesting from browser, it simply ask my username and password and gives access to API. But now I tried from Postman. I tried passing username and password fields in headers but it is not allowing me to access API.
I am continuously getting 401 unauthorized in Postman.
Upvotes: 1
Views: 4699
Reputation: 343
Upvotes: 0
Reputation: 443
Simply select "Authorization" tab and then the authorization method. Pretty clear in here https://learning.getpostman.com/docs/postman/sending_api_requests/authorization/
Faor your case choose "Basic" authorization
Upvotes: 1