What is the structure of a JWT - Java Brains

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • In this tutorial, we’ll understand the structure of a JWT. We’ll see how a JWT is created, what the parts of the token are and how you can construct and deconstruct a JWT yourself. We’ll also look at some of the implications of this JWT structure, and some of the resulting advantages and disadvantages of using JWTs for authorization as a direct result of how it is structured.
    Java Brains website: javabrains.io
    #JavaBrains #BrainBytes #WhatIs #JWT #Java #Tutorial #Concept

КОМЕНТАРІ • 318

  • @5s4l1p1fcw
    @5s4l1p1fcw 5 років тому +407

    1) Wake up. 2) Make a pot of coffee. 3). Binge watch Javabrains 😀. Thanks again Koushik!

    • @hattrickster33
      @hattrickster33 4 роки тому +19

      4. Profit

    • @blazkowicz666
      @blazkowicz666 3 роки тому +1

      It's crazy that I am doing the exact same thing rn

    • @cruzotto608
      @cruzotto608 3 роки тому +1

      i realize Im kind of off topic but do anyone know of a good website to stream new series online ?

    • @quinnkarson7251
      @quinnkarson7251 3 роки тому

      @Cruz Otto i watch on flixzone. You can find it on google =)

    • @cruzotto608
      @cruzotto608 3 роки тому

      @Quinn Karson Thanks, I went there and it seems to work :D Appreciate it !!

  • @andreizakovorotny4779
    @andreizakovorotny4779 4 роки тому +192

    An example of a perfect and meaningful explanation! That is a real gem, hard to find in the modern internet full of mediocre stuff.

    • @ujjalm007
      @ujjalm007 4 роки тому +6

      His tutorials are really good! Great content with so much clarity

    • @rsalwi
      @rsalwi 4 роки тому

      @Shandilya's Top 5 qqqqqqqqqqqqqqqqqqqqq+qqqqqqQqqqqqqqqqqqqqq+qqqqqqqqqqqqqqqq+qqqqqqqqqqqqqqq

    • @VivoY-nq5lm
      @VivoY-nq5lm 2 роки тому

      ur happy

  • @rohit250289
    @rohit250289 3 роки тому +40

    Probably the most underrated person on youtube ..He deserves many more subscribes for his top class content ...

  • @jukkahamalainen2454
    @jukkahamalainen2454 4 роки тому +47

    Wow! Watched the introduction to JWT and then this. Even though I knew most of the technical things behind JWT, I feel the explanations behind *why* we do these things gave me way better understanding about JWT's. I wish all the content in internet would be as clear and concise as these videos were. Thank you!

  • @AbhishekChanda
    @AbhishekChanda 5 років тому +76

    I have been working with JWT for the past 2 years and initially it was confusing and it took me some time to understand. How I wish this video was there at that time.
    Looking forward to the OAuth and Okta implementation (i think you are heading towards that only).

    • @samueltunde4210
      @samueltunde4210 3 роки тому +2

      very hard working and skilled expert who invariably understand what a problem all about and takes the necessary massage to get it done
      □Thanks to Hackernile5 on IG I got disable to account active back aging you'll should give him a try and thanks me later
      □I'm from Florida
      Facebook logged me out leat week after I posted a picture didn't know why
      We'lli solved the problem after seeing a ton for good recommendations in the comment about Hackernile5 on IG
      He helped me to get my account back
      □Thanks to Hackernile5 on IG I woke up this morning to find my lost Facebook account password sent to my email after he hacked 3year ago❣️❣️✏️

  • @gangambikahogtapur3254
    @gangambikahogtapur3254 3 роки тому +7

    Explained in a great way! Never imagined this concept to be so simple and interesting.

  • @kunalsingh-yj7xs
    @kunalsingh-yj7xs 4 роки тому

    Man...you are a true GURU....I am following your tutorial since long......just leave Linkedin and start teaching full time :)

  • @AmitKumar-we8dm
    @AmitKumar-we8dm 11 місяців тому

    aap bahuton k liye aadarsh hain bade bhai... Dil se dhanyawaad 🙏

  • @PramodKumar-hu7mt
    @PramodKumar-hu7mt 5 років тому +3

    I started my career with your tutorials.. I'm a regular follower of your videos.. Continue the good work koushik sir.. Waiting for next video

  • @rajnishtiwari1227
    @rajnishtiwari1227 3 роки тому

    Kouhik bhai i am saying this honestly that my search regarding the topic ended after seeing this tutorial. Best Best Best.

  • @ra7878
    @ra7878 Рік тому +2

    I routinely come back to review these videos as I'm working on different projects. Truly elegant and clear explanation of core concepts. You have a gift for educating!

  • @normanndiritu8806
    @normanndiritu8806 7 місяців тому

    This made JWTs very easy to understand. All explained from first principles! Amazing work @Java Brains

  • @DaveO0808
    @DaveO0808 Рік тому

    I cannot help but leave a comment for the wonderful (and super helpful) java guide for newbie developers like me. Thank you!

  • @rashmisingh2894
    @rashmisingh2894 4 роки тому +2

    Why do anybody wants to dislike this video??
    It's so amazingly explained!

    • @marioleon86
      @marioleon86 3 роки тому

      They tapped twice like inadvertently

  • @Mci146
    @Mci146 4 роки тому +11

    One of the best videos i have watched introducing a rather confusing concept and making it crystal clear, great work Koushik, thanks for sharing your knowledge!

  • @shreeram_kulkarni
    @shreeram_kulkarni 2 роки тому +1

    As always great explantion Koushik !
    Watched this vid today, despite it being recomended quite frequently on my home page. I just wish I could have watched this video earlier.

  • @munishthakur8018
    @munishthakur8018 3 роки тому

    So many guys explaining JWT out there. But all of them miss expalining about the signature and how it protects us from hackers. Thanks for the beautiful explanation.

  • @thellaidhinesh8646
    @thellaidhinesh8646 10 місяців тому

    Very very very very clear explanation, i've been referring to so many tutorials like this, i think this is the fifth video in the line, This is the best & i don't need to refer any related videos any more. Thanks for saving my time. Keep the good work going....

  • @Trippykiyay
    @Trippykiyay 2 роки тому

    I can’t believe i just came across your channel. This is gold, thank you!

  • @thinhle5765
    @thinhle5765 2 роки тому +1

    The 2 videos about JWT are so well structured and very clear. Thank you so much!

  • @rohansadawarte8778
    @rohansadawarte8778 10 місяців тому

    I never comment on any video at all. But your way of explanation is too good. It made me comment on this video. Good work, thank you so much. I got exactly all the info I was looking for

  • @prafulsinghvit
    @prafulsinghvit 3 роки тому +1

    It's just "once in a blue moon" feeling when I wish I could like a video multiple times. Can't thank enough.

  • @asawari520
    @asawari520 2 роки тому

    This is so addictive , I watch your videos just like a documentry or show on ott . you are an awesme guru , great narrator ,orator , animator , teacher , architect and yes the java programmer ! you just simplify this imaginary coding concepts!

  • @gdIndia199
    @gdIndia199 2 роки тому

    it's all time best video on JWT. Great. Thank you

  • @adryelgainza1686
    @adryelgainza1686 2 роки тому

    Going down the JWT rabbit hole. Thanks for the great free videos man !!!

  • @StefanReich
    @StefanReich 4 роки тому +82

    The three parts of a JWT are the header, the payload and the sick nature

  • @madram2011
    @madram2011 2 роки тому

    Highly appreciate the way of instruction
    Thanks for the best explanation ❤️❤️

  • @kazishafin1
    @kazishafin1 4 роки тому +1

    wish you have healthy and long life and keep making tutorials for us, the way of your teaching is AWESOMEE....Love from Bangladesh.

  • @santoshdash7646
    @santoshdash7646 2 роки тому

    This tutorial makes me conceptually clear. Heads up to Java Brain.

  • @anushanuti5757
    @anushanuti5757 4 роки тому +1

    Thank you Koushik. I cannot imagine a day without watching Java Brains and learning something new . Cant thank you enough. God Bless

  • @KeshariPiyush24
    @KeshariPiyush24 2 роки тому

    Your analogies are gem, please continue such noble work

  • @mtung05
    @mtung05 4 роки тому

    This is the best JWT explanation on the Internet!

  • @abed83a
    @abed83a 2 роки тому

    One of the best, if not the very best explanation available in the youtube and I am watching such tutorials for some years. He understands it very clearly. That is why he could explain the stuff so easy to understand way. Great work!

  • @BcomingHIM
    @BcomingHIM 3 роки тому

    thanks man. Really cleared the entire concept in half hour. Very nice explanation

  • @diego_elohim
    @diego_elohim 2 роки тому

    Best explanation ever about JWT

  • @brunocardoso8277
    @brunocardoso8277 4 роки тому

    I watched this video, figured out and it makes possible to solve a problem easily. Thank you very much!! you're spreading knowlodge around the world! Greetings from Brazil!!

  • @manojkumarm2561
    @manojkumarm2561 11 місяців тому

    A quality content on JWT. Thanks much sir.

  • @MuhammadAyaz-gp7xd
    @MuhammadAyaz-gp7xd 10 місяців тому

    Best Tutorial on Internet about JWT ❤

  • @sharadshahi4775
    @sharadshahi4775 Рік тому

    this is way beyond well presented content. Thank you alot. I am gonna go thru other videos too.

  • @cochi2221
    @cochi2221 5 років тому +11

    Thank you so much.
    When this JWT tutorial finishes, can you upload an OAUTH tutorial? I always try to implement it but I never understand it.

  • @jayakandadai
    @jayakandadai 5 років тому +5

    Awesome. So intuitive to understand your tutorials. Requesting you to do one on JWT Generation and Validation in conjunction with OAuth. Thanks in advance.

  • @shelduan89
    @shelduan89 Рік тому

    This is so helpful! Very simply nicely explained! Thank you

  • @jyothisingaram5078
    @jyothisingaram5078 2 роки тому

    Wow what a explanation fallen in love with you for this …awesome man…excellent

  • @sriplano748
    @sriplano748 Рік тому

    Really brilliant explanation. Would it be possible to create a summary diagram that gives an overview of the concepts taught. This would help us to brush through the concepts taught. You make it sound so easy.. Kudos to you!!

  • @29kangka
    @29kangka 4 роки тому

    I am building an SSO... And this video series is a life saver

  • @AbhinavKulshreshtha
    @AbhinavKulshreshtha 5 років тому +6

    I was using JWT for months now, But this is the first time I properly understand it. Thanks . Now I must go and implements safety measures in my app.
    Just a question, If Secure signature is linked to the content, and changing content changes that signature, In my current implementation, I have added expiry time ( 24hrs in unix number ) as part of the payload. Do I still need to implement a expired token bucket?

  • @muthuvijayan
    @muthuvijayan 4 роки тому +2

    Thanks for the nice explanation. Only thing i want to mention is to use a secure httponly cookie to store the token on the client and not local storage. As local storage data can be read by JS, it is vulnerable of XSS. Use httponly cookie instead.

  • @denizo982
    @denizo982 3 роки тому

    Thank you! Best JWT Video on UA-cam. Will definitely come back for other content.

  • @BryanRodriguez-sp2gq
    @BryanRodriguez-sp2gq 4 роки тому +1

    Best explanation found, thanks java brains!!

  • @sharathchandrareddy8959
    @sharathchandrareddy8959 4 роки тому

    Simple and straight to the point....

  • @OmarNg7X
    @OmarNg7X 3 роки тому

    The first 2 questions are literally the questions I had in my mind for ages. If there's a hall of fame for tech videos, this and part I should be on it. Nice work!!

  • @051_shivangtripathi8
    @051_shivangtripathi8 2 роки тому

    Nicely Explained JWT , thanks 👍

  • @hartford1231
    @hartford1231 2 роки тому

    excellent and clear explanation. thank you.

  • @ShivamMishra-tf6cf
    @ShivamMishra-tf6cf Рік тому

    Loved the explanation. Thank you so much!!

  • @rod9h
    @rod9h 3 роки тому

    Great video. Good explanation. Thank you.

  • @joeporsche1767
    @joeporsche1767 4 роки тому

    You have very good explanation. It’s clear and easy to understand. Thank you.

  • @ivanriotogonon6382
    @ivanriotogonon6382 2 роки тому +1

    Very clear explanation! I love how you sequence your vids per topic in a way that is easy to follow. I got really stuck in one of my projects as I have to learn about JWT fast and your vids helped me understand it quickly. Thank you so much for this!

  • @rajeevg4683
    @rajeevg4683 5 років тому +1

    As always, clear crisp and to the point.

  • @gyorgyszabo3607
    @gyorgyszabo3607 2 роки тому

    Very good tutorials, many thanks!

  • @raharney
    @raharney 3 роки тому

    Thanks for that. Very nicely explained.

  • @i_am_wiz
    @i_am_wiz 8 місяців тому

    Couldn't be more perfect. Kudos

  • @yashzala6587
    @yashzala6587 3 роки тому

    Best Tutorial on the topic

  • @srivatsahg
    @srivatsahg 4 роки тому

    Who are these people who 'unlike' these gem of the videos. They should know how much time consuming it is for Koushik has to put to make this content available to everyone for free. If you don't like it, simply ignore it. Why press unlike? I dont understand at all. Insane !

  • @chepaiytrath
    @chepaiytrath 4 роки тому +2

    From what I've gathered in the last videos, authorization is mainly validating if a logged-in user has access privileges to a certain endpoint once the user has been authenticated by the server(by any manner: JDBC/LDAP/JPA). In this video, it seems like JWT is only working towards authenticating rather than authorizing specific resources as you did by using antMatchers and ROLES in the previous videos. I hope the next video demonstrates authorization using JWT.

  • @mayorman0076
    @mayorman0076 Рік тому

    This is a beautiful explanation

  • @mayankarora5824
    @mayankarora5824 3 роки тому

    Thanks a lot Koushik. The questions and answers part of thid video is what I liked fhr most. I was just trying to get the answers to these questions and this video just hit right on the spot.

  • @stephenwall9036
    @stephenwall9036 2 роки тому

    Now finally, I understand it!! Thanks for this. Great explanation.

  • @thefullmoonlight
    @thefullmoonlight 3 роки тому

    Excellent videos on JWT - the previous one and this one. This is really brilliant. It is indeed true that teaching is a different skill altogether.

  • @davidlira8853
    @davidlira8853 3 роки тому

    These video series on OAuth has been super good. I love the analogies, the stick figures and basic diagrams, and did I mention analogies? Great job!

  • @reduser77
    @reduser77 4 роки тому +1

    no wonder why this video has no dislikes , huge thanks sir

  • @mustafakamalsirajudeen8133
    @mustafakamalsirajudeen8133 5 років тому

    Excellent. Waiting for the next video. As many of your followers requested, please do video for OAuth2 as well.

  • @muks
    @muks 4 роки тому

    Beautifully explained..well done. Thanks a lot.

  • @thisalma
    @thisalma 4 роки тому +1

    Thank you very much! Your videos are very helpful and gave me the idea of JWT in an easy to understand simple way ❤️

  • @OmSriUdayaKumarGade
    @OmSriUdayaKumarGade 5 років тому +3

    Thanks for helping the world. We are planning to implement JWT with OAuth for the REST services, your videos helps me in better understanding. Appreciate the service you are doing Kaushik. :)

  • @Alex-k6f3l
    @Alex-k6f3l Рік тому

    so clear! and also explain the pros & cons of JWT and suggestions how to solve this. ex, oAuth

  • @praveeng.8018
    @praveeng.8018 3 роки тому

    Thanks for sharing this. Very helpful.

  • @krishtheindian
    @krishtheindian 4 роки тому +1

    Just one word - Brilliant!

  • @hellomadhur
    @hellomadhur 3 роки тому

    Wonderful explanation. Thank you for this. You are doing a great service.

  • @MysticOblong
    @MysticOblong 3 роки тому

    Thanks for taking the time to create such an informative video! This answered my question about the secret part of JWTs and how that fits in with everything.

  • @SantoshKumar-gp5qm
    @SantoshKumar-gp5qm Рік тому

    Very Usefull ..nice one

  • @tangomoocow
    @tangomoocow 2 роки тому

    brilliant explanation, thanks

  • @aishwaryadwani9365
    @aishwaryadwani9365 3 роки тому

    this content is priceless , thanks Kaushik , you are love ❤️

  • @ChrisHsu
    @ChrisHsu 4 роки тому +1

    Loving these videos, however, did you mean to say OAuth is used for handling authentication and authorization at 14:38? In your first video you made the clear distinction it is not authentication as that's handled outside the OAuth process (as far as I'm understand this, the resource server before issuing an OAuth access token will check to see if there's a valid authenticated session, and if not, will direct the user to log into the resources server first ). Can you clarify this?

  • @perschistence2651
    @perschistence2651 5 років тому +25

    Could you set up an pay-pal please so we could freaking pay you for your genius tutorials?

    • @BalaKrishnan-mk6hq
      @BalaKrishnan-mk6hq 5 років тому +3

      ua-cam.com/video/1IY6vIdRG_0/v-deo.html

    • @perschistence2651
      @perschistence2651 5 років тому +2

      @@BalaKrishnan-mk6hq Thank you, I am a member now!

    • @BalaKrishnan-mk6hq
      @BalaKrishnan-mk6hq 5 років тому +3

      Java brains deserves our donation I will also join in this channel later on. I am glad you joined thanks Michael.

  • @Abi-iy6ek
    @Abi-iy6ek 2 роки тому

    Very clear explanation :) Tku so much. If https(or SSL) can prevent stealing the JWT, why do we even need the signature in the 1st place?

  • @colton2432
    @colton2432 4 роки тому +5

    How would you recommend maintaining a secret across multiple micro-services so that JWTs can be authorized?

  • @rishipahari
    @rishipahari 3 роки тому

    Thanks a lot, for clearing my doubts about Jwt.

  • @manishramesh5446
    @manishramesh5446 5 років тому +1

    Your videos are gems. Thank you.
    Can you make a brief video on how to write documentation for web projects.

  • @BluePhoenixGames1
    @BluePhoenixGames1 5 років тому +1

    Great tutorial! Looking forward to the next one showing how it can be implemented.

  • @nisarul-dev
    @nisarul-dev Рік тому

    Thank you for a amazing explanition.

  • @kaaviyam2710
    @kaaviyam2710 8 місяців тому

    No words to describe the words yu put to taught us!!

  • @nabeelyousafpasha
    @nabeelyousafpasha 4 роки тому

    Well explained. Respect from Pakistam.

  • @anu608497
    @anu608497 3 роки тому

    Thank you so much for the awesome explanation

  • @kag1984007
    @kag1984007 Рік тому

    Love your presentation skills and content with practical example. You made it look so easy to digest. Have been reading different blogs but was not able to get clarity. Thanks for the wonderful video. Out of curiosity do you have series on Linkedin learning ?

  • @ALEEMKHAWAR1
    @ALEEMKHAWAR1 2 роки тому

    very clear explanation.

  • @mihiragrawal1870
    @mihiragrawal1870 2 роки тому

    Great video. Kudos to the creator for the effort!!

  • @SuperPradeep21
    @SuperPradeep21 2 роки тому

    You are so awesome. It's the best video on JWT.

  • @sachinprasad2220
    @sachinprasad2220 2 роки тому

    Awesome explanation 🙂

  • @benjaminhobson2085
    @benjaminhobson2085 3 роки тому

    Another fantastic video. Thank you so much.

  • @MuhammadTayyab1
    @MuhammadTayyab1 4 роки тому

    so easy on my ears and brain, thanks man