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

Поділитися
Вставка
  • Опубліковано 8 лис 2023
  • 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: ua-cam.com/users/CodeDecode?...
    LinkedIn : / codedecodeyoutube
    Instagram: / codedecode25
    #codedecode #microservicesInterviewQuestion #microservices

КОМЕНТАРІ • 22

  • @itmastar
    @itmastar 8 місяців тому +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 8 місяців тому

      100% of questions are trending interview questions

    • @CodeDecode
      @CodeDecode  8 місяців тому +1

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

  • @SamPaulIsaac
    @SamPaulIsaac 15 днів тому

    Insightful, thanks team.

  • @itmastar
    @itmastar 8 місяців тому +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 8 місяців тому

      Solid principle we already have video

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

      We have videos on all these topics on channel👍

  • @user-io5hg1jn8i
    @user-io5hg1jn8i 5 місяців тому

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

  • @user-ne7zm8mt6v
    @user-ne7zm8mt6v 8 місяців тому +2

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

  • @sayanbiswas8847
    @sayanbiswas8847 8 місяців тому +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 8 місяців тому

      Can you please list down the questions you faced?

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

      Sure Sayan . Thanks for letting us know😊

  • @Parni_Stories
    @Parni_Stories 3 місяці тому

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

  • @swapnilmishra697
    @swapnilmishra697 8 місяців тому +2

    Really nice video

  • @user-io5hg1jn8i
    @user-io5hg1jn8i 5 місяців тому

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

  • @itmastar
    @itmastar 8 місяців тому +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  8 місяців тому +1

      Suree we will try to create one soon👍

  • @prasantkumar748
    @prasantkumar748 3 місяці тому

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

  • @ravikumarkuruba9587
    @ravikumarkuruba9587 8 місяців тому +1

    Thanks for the videos madam .