Table of contents
1.
Introduction
2.
Basic Authentication
3.
Bearer Authentication
4.
Frequently Asked Questions
4.1.
How to generate Bearer tokens for Authorisation in Katalon Studio?
4.2.
What is the drawback of Basic Authentication?
4.3.
What is the advantage of using Bearer Tokens?
5.
Conclusion
Last Updated: Mar 27, 2024
Easy

Basic and Bearer Authentication in Katalon

Author Yashesvinee V
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Hey there! 

We know that APIs use Authentication to ensure that only authorised clients can access data securely. Katalon Studio offers users to enter their Authorisation details for every Web service request made. Out of the five Authorisation options provided by Katalon, this blog will focus on Basic and Bearer Authentication.

Basic and Bearer Authentication in Katalon

Basic Authentication

Basic Authentication is a simple technique involving a username and password. The verified credentials are encoded and stored within the authorisation header to be sent along with the request.

Step 1: Create a New Web Service request.

Step 2: Select the request method and enter the URL. Add query parameters, if any.

Step 3: Navigate to the Authorisation tab and select Basic from the drop-down menu for Type.

Authentication options

Step 4: Enter the verified username and password for the request and click on Update to HTTP Header.

Basic authentication option

The encoded credentials embedded within the header can be viewed in the HTTP Header tab.

HTTP header with authorisation credential

Bearer Authentication

Bearer authentication uses tokens for authorisation. Whenever a login request is sent, the server generates a Bearer token. These encrypted strings must be added to the HTTP header and sent with the request.

Step 1: Create a New Web Service request.

Step 2: Select the request method and enter the URL. Add query parameters, if any.

Step 3: Navigate to the Authorisation tab and select Bearer from the drop-down menu for Type.

Step 4: Enter the Bearer token for the request and click on Update to HTTP Header.

Bearer authentication

The token gets added to the HTTP request header. It can be viewed in the HTTP Header tab.

HTTP header with Bearer token for authorisation

Frequently Asked Questions

How to generate Bearer tokens for Authorisation in Katalon Studio?

Bearer tokens are access tokens used with OAuth. OAuth 1.0 and OAuth 2.0 authorisation can generate bearer tokens.

What is the drawback of Basic Authentication?

Basic Authentication is extremely simple and vulnerable as it uses only a username and password for authorisation. It is not compatible with two-step verification techniques.

What is the advantage of using Bearer Tokens?

Bearer tokens do not require complex libraries to make requests. It is straightforward and easy to implement.

Conclusion

This blog explains the Basic and Bearer Authentication methods for authorising web service requests in Katalon Studio. Check out our articles on Generate Test Steps in Manual and Script View, Manage Test Projects in Katalon and Manage Mobile Test Objects in Katalon.

Explore our Library on Coding Ninjas Studio to gain knowledge on Data Structures and Algorithms, Machine Learning, Deep Learning, Cloud Computing and many more! Test your coding skills by solving our test series and participating in the contests hosted on Coding Ninjas Studio! Looking for questions from tech giants like Amazon, Microsoft, Uber, etc.? Look at the problems, interview experiences, and interview bundle for placement preparations. Upvote our blogs if you find them insightful and engaging! Happy Coding!

Thank you

Live masterclass