![]() Note: We are using the username as postman and password as password Enter the following key-value pairs in Header.We will follow these steps to check whether we can access the same API we used above or not Checking authorization using credentials These username and password values should be encoded with Base64 otherwise the server won't be able to recognize it. While using basic authentication we add the word Basic before entering the username and password. The username and password are sent as header values in the Authorization header. It requires just a username and password for checking the authorization of any person ( That is why we say basic access authentication). Basic Access Authentication / HTTP Basic AuthenticationĪ Basic Access Authentication is the most simple and basic type of authorization available. Let us see the different types of Authentication available to us. Authorization plays a very important role in deciding the accesses and tightening the security. Maybe a person changes the data for money or a person can leak the data to another company. There are numerous reasons possible for the same. If I allow an intern to access my database APIs then inadvertently he can change the data and that data can be lost forever which can come as a cost to the company. This is because it can lead to possible security breaches. In the last section, we discussed that a resource owner does not allow access to the resources to everyone in the company. Later in the tutorial, we will try to access the same API using the credentials as we discussed in the last section. The status code and response from the server indicate that we are not authorized to access the API we are trying to access( See Responses tutorial to learn more**). ![]() Note: The status code is 401 which corresponds to unauthorized access and the response message says Unauthorized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |