NotionCommotion Posted February 12, 2018 Share Posted February 12, 2018 Tried out JWT tokens for the first time. The logon form sends username/password to the server via Ajax, and the server authenticates using normal practices and returns {jwt:xyz} with 200 or an error message with 401. From now on, I will either be doing Ajax/XMLHttpRequest requests or normal HTML requests (what the heck is the right word for a "normal" request?). Reading about JWT tokens, it sounds like I want to send the header back on each request. How does one send it to the server? I could just use JavaScript to store it in a cookie, and then it will be sent on all requests, right? If it is so simple, why have people written all these blogs about sending as a header? Granted, I suppose cookies are a header, but I don't think that is what people were writing about. I suppose I could store it in HTML5 storage, but then I think I will need to implement a bunch of JS to send when accessing a href link. Thanks Quote Link to comment Share on other sites More sharing options...
ginerjm Posted February 12, 2018 Share Posted February 12, 2018 Entities?? Slim??? JWT???? How do you find all of these things to discuss at one time? Three things I have never even heard of and you are trying to solve dilemmas involving them all together. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.