Top 3 JWT Interview Questions and Answers| JWT Token structure explained | Code Decode |

Sdílet
Vložit
  • čas přidán 5. 08. 2024
  • In this video of code decode we have covered top 3 jwt interview questions for experienced and freshers canditates
    Udemy Course of Code Decode on Microservice k8s AWS CICD link:
    openinapp.co/udemycourse
    Course Description Video :
    yt.openinapp.co/dmjvd
    What is JWT?
    JWT stands for JSON Web Token. It is a compact and self-contained way to represent information between two parties, typically used for securely transmitting information between a client and a server or between different services within a system. JWTs are often used in authentication and authorization scenarios.
    A JWT is a string that consists of three parts separated by dots (.):
    Header: The header typically consists of two parts: the token type (JWT) and the signing algorithm being used, such as HMAC SHA256 or RSA.
    Payload: The second part of the token is the payload, which contains the claims. Claims are statements about an entity (typically, the user) and additional data. There are three types of claims: registered, public, and private claims.
    Signature: To create the signature part, you have to take the encoded header, encoded payload, a secret, and the algorithm specified in the header and sign that.
    What kind of information should be put into JWT?
    Minimize Sensitive Data: Avoid including sensitive information such as passwords or personal identification numbers in JWTs. JWTs are base64-encoded, and anyone with the token can decode and read its contents.
    Keep it Compact: JWTs are meant to be compact and lightweight. Only include necessary information to avoid unnecessary overhead.
    Avoid Redundancy: Some information might be redundant if it can be obtained from other sources, such as a user database.
    Contextual Information: Include information that is relevant and needed for the particular interaction or use case. For authentication, including the user ID or roles might be sufficient.
    Use Custom Claims: For application-specific data, use custom claims that are not predefined by the JWT standard.
    What kind of information should be put into JWT?
    Minimize Sensitive Data: Avoid including sensitive information such as passwords or personal identification numbers in JWTs. JWTs are base64-encoded, and anyone with the token can decode and read its contents.
    Keep it Compact: JWTs are meant to be compact and lightweight. Only include necessary information to avoid unnecessary overhead.
    Avoid Redundancy: Some information might be redundant if it can be obtained from other sources, such as a user database.
    Contextual Information: Include information that is relevant and needed for the particular interaction or use case. For authentication, including the user ID or roles might be sufficient.
    Use Custom Claims: For application-specific data, use custom claims that are not predefined by the JWT standard.
    How does resource server validates a given JWT token? Does it need to go to auth server each time a token comes?
    Most Asked Core Java Interview Questions and Answers: • Core Java frequently a...
    Advance Java Interview Questions and Answers: • Advance Java Interview...
    Java 8 Interview Questions and Answers: • Java 8 Interview Quest...
    Hibernate Interview Questions and Answers:
    • Hibernate Interview Qu...
    Spring Boot Interview Questions and Answers:
    • Advance Java Interview...
    Angular Playlist: • Angular Course Introdu...
    SQL Playlist: • SQL Interview Question...
    GIT: • GIT
    Subscriber and Follow Code Decode
    Subscriber Code Decode: czcams.com/users/CodeDecode?...
    LinkedIn : / codedecodeyoutube
    Instagram: / codedecode25
    #codedecode #microservicesInterviewQuestion #microservices

Komentáře • 22

  • @itmastar
    @itmastar Před 9 měsíci +5

    I have been attending interviews lately during last two weeks. I have found this channel useful and will recommend to all. Keep up the good work !!

    • @itmastar
      @itmastar Před 9 měsíci

      100% of questions are trending interview questions

    • @CodeDecode
      @CodeDecode  Před 8 měsíci +1

      Thanks a lot for letting us know that these are still trending❤️

  • @SamPaulIsaac
    @SamPaulIsaac Před 27 dny

    Insightful, thanks team.

  • @itmastar
    @itmastar Před 9 měsíci +6

    Can you plz make a video on SOLID principles, JVM architecture (How JVM works) , class loaders, types of method references if not made already

    • @krtravi
      @krtravi Před 8 měsíci

      Solid principle we already have video

    • @CodeDecode
      @CodeDecode  Před 8 měsíci

      We have videos on all these topics on channel👍

  • @swapnilmishra697
    @swapnilmishra697 Před 9 měsíci +2

    Really nice video

  • @user-io5hg1jn8i
    @user-io5hg1jn8i Před 6 měsíci

    please provide some video on access token and refresh token based interview questions

  • @user-io5hg1jn8i
    @user-io5hg1jn8i Před 6 měsíci

    What Algorithm used?
    What are claims?
    Can token decrypt if hacker know algorithm?

  • @sayanbiswas8847
    @sayanbiswas8847 Před 9 měsíci +1

    Very important questions, faced them in my last interview. Please include your last video - microservices interview questions - in the microservices playlist. Thanks team

    • @shubhamkatkade611
      @shubhamkatkade611 Před 9 měsíci

      Can you please list down the questions you faced?

    • @CodeDecode
      @CodeDecode  Před 8 měsíci

      Sure Sayan . Thanks for letting us know😊

  • @user-ne7zm8mt6v
    @user-ne7zm8mt6v Před 9 měsíci +2

    Can you make a video on distributed logging and different tools to trace them?

  • @Parni_Stories
    @Parni_Stories Před 4 měsíci

    can u pls elaborate more on Token signature verification using public key

  • @itmastar
    @itmastar Před 9 měsíci +2

    If there is a 4 hour or 5 hour long video to prepare for an interview a day before ..as a brush up ...That would be great ...I know that is too much to ask

    • @CodeDecode
      @CodeDecode  Před 8 měsíci +1

      Suree we will try to create one soon👍

  • @prasantkumar748
    @prasantkumar748 Před 3 měsíci

    one question what if someone intercepted the request and tries to access other API's with same token. how to prevent that?

  • @ravikumarkuruba9587
    @ravikumarkuruba9587 Před 9 měsíci +1

    Thanks for the videos madam .