#need help implementing JWT

21 messages · Page 1 of 1 (latest)

hidden violet
#

Hello! im trying to learn spring security by creating a RestfulAPI for users to be able to create and store notes. Think google keep type stuff. Since this is a project id like to put put on my resume (im working towards getting a backend job) id like it to reflect I understand standard things like endpoints, auth, spring booth project structure, etc... the thing is that i tried implementing jwt already using a geeks4geeks tutorial, and writing out every single line of code they provided to try to understand how everything comes together, but i didn't understand a single thing i did, got very overwhelmed, and ended up deleting the git branch i made because it wouldn't work right. Then i tried using chatgtp to see if i could get tutor-like experience where I can ask questions as i go, go step-by-step etc..., but chat ended up being completely useless (lol i know shocker) since it couldn't read my GitHub repo properly and was asking mebto send individual github raws (hell no, project is to big to be doing ts). So im kinda stumped and dont know where to turn for help, since i dont know anyone who can help me with this problem. Im a cs graduate and believe I have good understanding of the lang and programming basics, so working with me would not be about explaining basics.

prisma ginkgoBOT
#

This post has been reserved for your question.

Hey @hidden violet! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

lean niche
#

That being said, for JWT specifically, I'd say do the following in order:

  • (optional) You might want to know what microservices are and why they can scale better than monoliths but that isn't important for understanding JWTs (but might help with getting a backend job)
  • Make sure you first understand the problem JWTs solve
  • Make sure you know what guarantees you get from digital signatures+their verification on a very basic level (not how exactly they work, just what they can do from a user's perspective and what they prevent (forging signed data))
  • See what a JWT consists of
  • Take a look at how it is stored
  • Check how it is generated and verified/used
  • How is authentication stored normally and how does a JWT differ ("stateless")?
  • Implement JWT authentication yourself
#

If you have specific questions on the way, feel free to ask

lean niche
lean niche
hidden violet
#

Thank you so much for ur suggestion, i can def see how u got to the conclusion that im copying/pasting/letting the llm write the code for me, but i assure you that in my last implementation i wrote the code myself line by line from the tutorial to try to see how everything worked together, ill edit my post later since im in a bit of a rush now, as for ur suggestion, i have studied up on jwts, what they are, their format, and what problem they solve, you did say a few things that i didnt take into consideration at first so ill make sure to look into those points. However my current problem is that i think i understand the basics of implementing it bc of my prev work, however i fail to understand the small details of the implementations, like why certain classes are necessary, why certain things are the way they are, and how certain configs work, etc…

prisma ginkgoBOT
hidden violet
#

Ill add more to that later, since i cant rn

lean niche
prisma ginkgoBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

hidden violet
#

thanks for all your advice still!

prisma ginkgoBOT
# hidden violet thanks for all your advice still!

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.

hidden violet
lean niche
#

just askh them here whenever you have them

#

it doesn't need to be all at once

prisma ginkgoBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

hidden violet
#

Will do 🫡