Validate Access Tokens (2024)

An access token is meant for an API and should be validated only by the API for which it was intended.

Identity Provider (IdP) access tokens do not require validation. Pass the IdP access token to the issuing IdP to handle the validation. For more information, see Identity Provider Access Tokens for details.

If any of these checks fail, the token is considered invalid, and the request must be rejected with 401 Unauthorized result.

  1. Perform standard JWT validation. Because the access token is a JWT, you need to perform the standard JWT validation steps. See Validate JSON Web Tokens for details.

  2. Verify token audience claims. If you've performed the standard JWT validation, you have already decoded the JWT's payload and looked at its standard claims. The token audience claim (aud, array of strings) depends on the initial token request. The aud field could contain both an audience corresponding to your custom API and an audience corresponding to the /userinfo endpoint. At least one of the audience values for the token must match the unique identifier of the target API as defined in your API's Settings in the Identifier field. See Get Access Tokens for details.

  3. Verify permissions (scopes). Verify that the application has been granted the permissions required to access your API. To do so, you will need to check the scope claim (scope, space-separated list of strings) in the decoded JWT's payload. It should match the permissions required for the endpoint being accessed. For example, if your custom API provides three endpoints to read, create, or delete a user record, when you registered your API with Auth0, you created three corresponding permissions:

    1. create:users provides access to the /create endpoint

    2. read:users provides access to the /read endpoint

    3. delete:users provides access to the /delete endpoint

    In this case, if an application requests access the /create endpoint, but the access token's scope claim does not include the value create:users, then the API should reject the request.

Learn more

Validate Access Tokens (2024)
Top Articles
5.2 Self-Defense – Criminal Law
Naruto: 7 Characters That Can Defeat Sasuke Uchiha (& 7 That Can't)
Matgyn
O'reilly's Auto Parts Closest To My Location
How To Be A Reseller: Heather Hooks Is Hooked On Pickin’ - Seeking Connection: Life Is Like A Crossword Puzzle
Co Parts Mn
Clafi Arab
Kentucky Downs Entries Today
Legacy First National Bank
Ssefth1203
Robert Malone é o inventor da vacina mRNA e está certo sobre vacinação de crianças #boato
Betonnen afdekplaten (schoorsteenplaten) ter voorkoming van lekkage schoorsteen. - HeBlad
O'reilly's Auto Parts Closest To My Location
Classic Lotto Payout Calculator
Shreveport Active 911
Viprow Golf
Cambridge Assessor Database
R Cwbt
Ally Joann
Tinker Repo
Selfservice Bright Lending
Vegas7Games.com
Ups Drop Off Newton Ks
Dragonvale Valor Dragon
Bay Area Craigslist Cars For Sale By Owner
Amerisourcebergen Thoughtspot 2023
Violent Night Showtimes Near Johnstown Movieplex
Narragansett Bay Cruising - A Complete Guide: Explore Newport, Providence & More
2004 Honda Odyssey Firing Order
John Deere 44 Snowblower Parts Manual
In hunt for cartel hitmen, Texas Ranger's biggest obstacle may be the border itself (2024)
Orange Pill 44 291
Uhaul Park Merced
Mistress Elizabeth Nyc
Emerge Ortho Kronos
Hindilinks4U Bollywood Action Movies
Avance Primary Care Morrisville
8776725837
Cleveland Save 25% - Lighthouse Immersive Studios | Buy Tickets
Booknet.com Contract Marriage 2
Cvs Coit And Alpha
Tito Jackson, member of beloved pop group the Jackson 5, dies at 70
Washington Craigslist Housing
Oak Hill, Blue Owl Lead Record Finastra Private Credit Loan
Ciara Rose Scalia-Hirschman
Powah: Automating the Energizing Orb - EnigmaticaModpacks/Enigmatica6 GitHub Wiki
Parks And Rec Fantasy Football Names
How to Find Mugshots: 11 Steps (with Pictures) - wikiHow
Philasd Zimbra
Craigslist Centre Alabama
Latest Posts
Article information

Author: Jonah Leffler

Last Updated:

Views: 5955

Rating: 4.4 / 5 (45 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.