API Testing Using Rest Assured Part-3 | How to Handle Basic Authentication

Published: 28 May 2020
on channel: Automation Tour
493
14

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.


On this page of the site you can watch the video online API Testing Using Rest Assured Part-3 | How to Handle Basic Authentication with a duration of hours minute second in good quality, which was uploaded by the user Automation Tour 28 May 2020, share the link with friends and acquaintances, this video has already been watched 493 times on youtube and it was liked by 14 viewers. Enjoy your viewing!