Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

#4. OAuth 2.0 Flow – What Is A Bearer Token?

Posted on 04/23/2025 By admin

I have explained the Flow of OAuth 2.0 in the previous post. In Step C – Request Access Token, I mentioned that the client requests an access token from the Authorization server using the Authorization grant received in step B. 

Access tokens can have different formats and structures. The bearer token is one of the access tokens.

Video tutorials help in better learning. You must watch the video below. But it is always a good practice to read and understand the articles as well.

Bearer Tokens are the predominant type of access token used with OAuth 2.0. A bearer token is an opaque string. It is not possible to understand or read through the bearer token. The client is not supposed to extract any information about the resource owner from the bearer token.

Below is an example of the bearer token –

Bearer ya29.a0AVvZVso2p6SPMtqPpVA4xvqiULI5Jf_J5Xm0J8YiKOuXZfDqon7b0hW8hI8R0_4oREs534aJsa2hPEWf4193STMx3uY7h54HhZfQa93X87PDorglSxW67QmW29Smh-Q3OLcvQ8wC_SgB75UDB_6JFLXSf5-nyojOaCgYKAYUSAQASFQGbdwaIsRDrmFSwqNjQSnttGfEYew0167

It is called a bearer token or bearer authorization as it implies “Fulfill the request made by the bearer of this token on successful validation”. For example – If a resource owner has authorized a client to upload a file on Google Drive then the client needs to represent the bearer token i.e. access token with the Google Drive API to upload a file in the resource owner’s Drive.

As per RFC 6750, there are three methods to send bearer access tokens in resource requests to resource servers. Clients must not use more than one method to transmit the token in each request.

The client can pass the bearer token in the “Authorization” header as part of the request headers. An example is given below –

The client adds the access token to the request body using the “access_token” parameter with the Content-Type header as “application/x-www-form-urlencoded”.

The client adds the access token to the request URI using the “access_token” parameter.

Thanks for reading. Kindly comment for any feedback and suggestions.

Uncategorized

Post navigation

Previous Post: Architecture of Selenium Webdriver
Next Post: TestNG Tutorials 64: Dependency in TestNG – ignoreMissingDependencies – Another Way of Achieving Soft Dependencies

Related Posts

waits in selenium Uncategorized
Selenium Interview Questions Uncategorized
Handling Website Popups In Selenium webdriver | Make Selenium Easy Uncategorized
REST Assured Tutorial 39 – @JsonIgnore Annotation of Jackson API – Exclude Field of Pojo From Serialization and Deserialization Uncategorized
TestNG Tutorials 29: Grouping Configuration Methods in TestNG Uncategorized
TestNG Tutorials 7: How To Create Customized TestNG XML? Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark