4. How does Basic Authentication work?
Answer: In Basic Authentication, the username and password are combined into a single string and encoded in Base64. This encoded string is sent in the request header. Postman uses the following format:
pgsql
Authorization: Basic <Base64 encoded username:password>
- This authentication method is simple but not ideal for security-sensitive applications due to its exposure of credentials.
5. How do you implement API Key Authentication in Postman?
- Answer: To use API Key authentication in Postman:
- Select API Key from the Auth Type dropdown list in the Authorization tab.
- Enter the key name and value.
- Choose whether to send the key in the Header or as a Query Parameter.
- Optionally, you can store the API key in Postman variables for extra security. This method sends a key-value pair to the API and is widely used for API-level security.
- Select API Key from the Auth Type dropdown list in the Authorization tab.
6. What is Bearer Token Authentication?
Answer: Bearer Token Authentication involves sending an access token in the request’s Authorization header. The token, typically a JWT (JSON Web Token), is included in the header with the Bearer prefix:
makefile
Authorization: Bearer <Your Token> This method is often used for stateless authentication systems.