filmov
tv
API Testing Using Rest Assured Part-3 | How to Handle Basic Authentication
Показать описание
Hi All, This is Rahul and Today we will learn:
How to Handle Basic Authentication by using Rest Assured
What is Authentication?
======================
Authentication is the process of verifying the identity of a person or device.
Example: Entering a username and password when you log in to a website/gmail/facebook.
There are two types of basic authentication:
============================================
1. Preemptive basic authentication
It sends the credentials even before the server gives an unauthorized response in certain situations, thus additional call is avoided. We normally prefer Preemptive basic authentication in most situations, unless we want to test the server’s ability to send back the challenge response.
2. Challenged basic authentication
When using challenged basic authentication REST Assured will not supply
the credentials unless the server has explicitly asked for it. This means
that REST Assured will make an additional request to the server in order
to be challenged and then follow up with the same request once more but this time setting the basic credentials in the header.
How to Handle Basic Authentication by using Rest Assured
What is Authentication?
======================
Authentication is the process of verifying the identity of a person or device.
Example: Entering a username and password when you log in to a website/gmail/facebook.
There are two types of basic authentication:
============================================
1. Preemptive basic authentication
It sends the credentials even before the server gives an unauthorized response in certain situations, thus additional call is avoided. We normally prefer Preemptive basic authentication in most situations, unless we want to test the server’s ability to send back the challenge response.
2. Challenged basic authentication
When using challenged basic authentication REST Assured will not supply
the credentials unless the server has explicitly asked for it. This means
that REST Assured will make an additional request to the server in order
to be challenged and then follow up with the same request once more but this time setting the basic credentials in the header.