- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Authenticating by encoding through Postman
In Postman, sometimes we need to verify the eligibility of a user accessing a particular resource on the server. This is done by authenticating the credentials of a user by the system.
Thus authentication helps to identify the identity of a user and is applied for the secured APIs. In Postman, this is carried out under the Authorization tab. The TYPE dropdown in the Authorization tab, lists down all the Authorization types.
To carry out an encoded authentication, we have to choose the option No Auth from the TYPE dropdown in the Authorization tab and simultaneously from the Headers tab, we have to incorporate a new key-value pair.
The key should be Authorization and the value is the user credentials having the syntax as - basic <encoded user credentials>. Let us take an endpoint as https://postman-echo.com/basic-auth. The username for this endpoint is postman and the password is password.
Next, to add the credentials in the encoded format we shall take the help of a third party application having the link − https://www.base64encode.org/. Enter the username (postman) and password (password) in the edit box in the format − postman − password as shown in the below image. Then click on Encode.
We will obtain an encoded text cG9zdG1hbjpwYXNzd29yZA== at the bottom of the page. This has to be added as the value of the Authorization key in Postman in the format − basic cG9zdG1hbjpwYXNzd29yZA==. Then send the API request.
The Response code is 200 OK which points to a successful request.
- Running the collection using Newman through share link in Postman
- Running the collection using Newman through JSON file in Postman
- Java Program to loop through Map by Map.Entry
- URL Encoding in HTML5
- SHA encoding using Python?
- What is Data Encoding?
- What is Unipolar Encoding?
- What is Polar Encoding?
- What is Bipolar Encoding?
- What is ISCII Encoding?
- GUID in Postman
- Postman Cheat Sheet
- MD5 hash encoding using Python?
- Run Length Encoding in Python
- Detect base64 encoding in PHP?