[{"data":1,"prerenderedAt":1230},["ShallowReactive",2],{"blog-json-web-token":3,"blog-all-for-related":766},{"id":4,"title":5,"author":6,"body":7,"cardAlt":5,"categories":750,"description":753,"draft":754,"extension":755,"headerImage":756,"keywords":757,"meta":758,"name":759,"navigation":760,"path":761,"seo":762,"series":6,"stem":763,"updated":6,"year":764,"__hash__":765},"blog\u002Fblog\u002Fjson-web-token.md","Complete Guide to JWT",null,{"type":8,"value":9,"toc":737},"minimark",[10,14,733],[11,12,13],"p",{},"Modern internet requires an information flow between applications. JSON Web Tokens are a very compact way to carry information. JWT is most commonly used for authentication in applications where receiver can verify the request from sender. In this article, we will learn about JWT in depth covering it's structure and when to use it. In future articles, I'll be covering ways to implement JWT in your applications.",[15,16,17,20,25,53,58,66,79,82,125,132,135,138,141,159,170,215,217,220,227,230,261,322,328,330,332,339,342,356,387,390,433,436,447,449,453,478,480,484,523,525,529,532,649,653,676,678,682,689,707,710,719,728],"ads",{},[18,19],"hr",{},[21,22,24],"h2",{"id":23},"what-is-json-web-token","What is JSON Web Token?",[11,26,27,28,35,36,40,41,44,45,48,49,52],{},"In a more formal way - JSON Web Token (JWT) is an open standard (",[29,30,34],"a",{"href":31,"rel":32},"https:\u002F\u002Ftools.ietf.org\u002Fhtml\u002Frfc7519",[33],"nofollow","RFC 7519",") that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. JWTs can be signed using a secret (with the ",[37,38,39],"strong",{},"HMAC"," algorithm) or a public\u002Fprivate key pair using ",[37,42,43],{},"RSA"," or ",[37,46,47],{},"ECDSA",". Thus the information can be ",[37,50,51],{},"verified and trusted"," because it is digitally signed. But, JWT is not encrypted so should be used over HTTPS connection.",[54,55,57],"h3",{"id":56},"structure-of-jwt","Structure of JWT",[11,59,60,61,65],{},"JSON Web Tokens (in compact form) consists of three parts which are separated by dots. (",[62,63,64],"code",{},".",")",[67,68,69,73,76],"ul",{},[70,71,72],"li",{},"Header",[70,74,75],{},"Payload",[70,77,78],{},"Signature",[11,80,81],{},"A JWT typically looks like the following -",[83,84,89],"pre",{"className":85,"code":86,"language":87,"meta":88,"style":88},"language-js shiki shiki-themes github-light github-dark","\u003Cbase64url-encoded header>.\u003Cbase64url-encoded claims>.\u003Csignature>\n","js","",[62,90,91],{"__ignoreMap":88},[92,93,96,100,104,108,111,113,116,118,122],"span",{"class":94,"line":95},"line",1,[92,97,99],{"class":98},"sVt8B","\u003C",[92,101,103],{"class":102},"sj4cs","base64url-encoded",[92,105,107],{"class":106},"sScJk"," header",[92,109,110],{"class":98},">.\u003C",[92,112,103],{"class":102},[92,114,115],{"class":106}," claims",[92,117,110],{"class":98},[92,119,121],{"class":120},"s9eBZ","signature",[92,123,124],{"class":98},">\n",[11,126,127],{},[128,129],"img",{"alt":130,"src":131},"JWT Structure","https:\u002F\u002Fwww.mohitkhare.com\u002Fimages\u002Fblog\u002Fjson-web-token\u002Fjwt-structure.webp",[11,133,134],{},"Let's learn about each component to understand JWT better.",[54,136,72],{"id":137},"header",[11,139,140],{},"The header includes metadata information about the JSON Web Token. In contains two parts:",[67,142,143,153],{},[70,144,145,148,149,152],{},[62,146,147],{},"typ"," - Type of the token: ",[62,150,151],{},"JWT"," always",[70,154,155,158],{},[62,156,157],{},"alg"," - Signing algorithm being used. Eg. HMAC SHA256 or RSA.",[11,160,161,162,165,166,169],{},"The header includes ",[62,163,164],{},"claims"," about the token. We'll discuss more about claims in the next section. This JSON is ",[37,167,168],{},"Base64Url"," encoded to form the first part of the JWT.",[83,171,175],{"className":172,"code":173,"language":174,"meta":88,"style":88},"language-json shiki shiki-themes github-light github-dark","{\n  \"alg\": \"HS256\",\n  \"typ\": \"JWT\"\n}\n","json",[62,176,177,182,198,209],{"__ignoreMap":88},[92,178,179],{"class":94,"line":95},[92,180,181],{"class":98},"{\n",[92,183,185,188,191,195],{"class":94,"line":184},2,[92,186,187],{"class":102},"  \"alg\"",[92,189,190],{"class":98},": ",[92,192,194],{"class":193},"sZZnC","\"HS256\"",[92,196,197],{"class":98},",\n",[92,199,201,204,206],{"class":94,"line":200},3,[92,202,203],{"class":102},"  \"typ\"",[92,205,190],{"class":98},[92,207,208],{"class":193},"\"JWT\"\n",[92,210,212],{"class":94,"line":211},4,[92,213,214],{"class":98},"}\n",[18,216],{},[54,218,75],{"id":219},"payload",[11,221,222,223,226],{},"The second part of the token is the payload (also known as body) contains the claims. ",[37,224,225],{},"Claims"," are statements about an entity and additional data. Claims follow the standard key-value pairing that you see in dictionaries and JSON objects.",[11,228,229],{},"There are three types of claims:",[67,231,232,243,255],{},[70,233,234,237,238,64],{},[37,235,236],{},"Registered claims"," - These claims provide a starting point for a set of useful, interoperable claims. Eg. \"iss\", \"sub\". You can explore other registered claims ",[29,239,242],{"href":240,"rel":241},"https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519#section-4.1",[33],"here",[70,244,245,248,249,254],{},[37,246,247],{},"Public claims"," - These claims are available to public and need to be registered in the IANA ",[29,250,253],{"href":251,"rel":252},"https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519#section-10.1",[33],"JSON Web Token Claims"," registry.",[70,256,257,260],{},[37,258,259],{},"Private claims"," - these are custom claims to share information between two parties.",[83,262,264],{"className":172,"code":263,"language":174,"meta":88,"style":88},"{\n  \"sub\": \"123456\",\n  \"user\": \"Mohit Khare\",\n  \"subscriber\": true,\n  \"exp\": 1637421361\n}\n",[62,265,266,270,282,294,306,317],{"__ignoreMap":88},[92,267,268],{"class":94,"line":95},[92,269,181],{"class":98},[92,271,272,275,277,280],{"class":94,"line":184},[92,273,274],{"class":102},"  \"sub\"",[92,276,190],{"class":98},[92,278,279],{"class":193},"\"123456\"",[92,281,197],{"class":98},[92,283,284,287,289,292],{"class":94,"line":200},[92,285,286],{"class":102},"  \"user\"",[92,288,190],{"class":98},[92,290,291],{"class":193},"\"Mohit Khare\"",[92,293,197],{"class":98},[92,295,296,299,301,304],{"class":94,"line":211},[92,297,298],{"class":102},"  \"subscriber\"",[92,300,190],{"class":98},[92,302,303],{"class":102},"true",[92,305,197],{"class":98},[92,307,309,312,314],{"class":94,"line":308},5,[92,310,311],{"class":102},"  \"exp\"",[92,313,190],{"class":98},[92,315,316],{"class":102},"1637421361\n",[92,318,320],{"class":94,"line":319},6,[92,321,214],{"class":98},[11,323,324,325,327],{},"In the above payload, we've defined three private claims with an expiry time that share specific information between server and client for an application. Again, this JSON is ",[37,326,168],{}," encoded to constitute the second part of the JWT. Also, the payload of any JWT by default can be decoded by anyone.",[18,329],{},[54,331,78],{"id":121},[11,333,334,335,338],{},"The third part of the JSON web token is the signature. Signature helps in ensuring that a given token wasn't changed or manipulated by some middleman, since JWTs are ",[37,336,337],{},"digitally signed"," that requires either a secret or a public\u002Fprivate key pair.",[11,340,341],{},"To create the signature part you need four components that is then required to be signed.",[67,343,344,347,350,353],{},[70,345,346],{},"Base64 encoded header",[70,348,349],{},"Base64 encoded payload",[70,351,352],{},"Secret",[70,354,355],{},"Cryptographic algorithm",[83,357,359],{"className":85,"code":358,"language":87,"meta":88,"style":88},"signature = CryptoAlgo(base64(header), base64(payload), secret);\n",[62,360,361],{"__ignoreMap":88},[92,362,363,366,370,373,376,379,382,384],{"class":94,"line":95},[92,364,365],{"class":98},"signature ",[92,367,369],{"class":368},"szBVR","=",[92,371,372],{"class":106}," CryptoAlgo",[92,374,375],{"class":98},"(",[92,377,378],{"class":106},"base64",[92,380,381],{"class":98},"(header), ",[92,383,378],{"class":106},[92,385,386],{"class":98},"(payload), secret);\n",[11,388,389],{},"Here is an example of how we can create a signature.",[83,391,395],{"className":392,"code":393,"language":394,"meta":88,"style":88},"language-go shiki shiki-themes github-light github-dark","HMACSHA256(\n  base64UrlEncode(header) + \".\" + base64UrlEncode(payload),\n  secret);\n","go",[62,396,397,405,428],{"__ignoreMap":88},[92,398,399,402],{"class":94,"line":95},[92,400,401],{"class":106},"HMACSHA256",[92,403,404],{"class":98},"(\n",[92,406,407,410,413,416,419,422,425],{"class":94,"line":184},[92,408,409],{"class":106},"  base64UrlEncode",[92,411,412],{"class":98},"(header) ",[92,414,415],{"class":368},"+",[92,417,418],{"class":193}," \".\"",[92,420,421],{"class":368}," +",[92,423,424],{"class":106}," base64UrlEncode",[92,426,427],{"class":98},"(payload),\n",[92,429,430],{"class":94,"line":200},[92,431,432],{"class":98},"  secret);\n",[11,434,435],{},"Finally we have our JWT created.",[83,437,441],{"className":438,"code":439,"language":440,"meta":88,"style":88},"language-html shiki shiki-themes github-light github-dark","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTYiLCJ1c2VyIjoiTW9oaXQgS2hhcmUiLCJzdWJzY3JpYmVyIjp0cnVlLCJleHAiOjE2Mzc0MjEzNjF9.QQskwkC3f9UbomHQqdxel5FDH8jIsLvokC5AsPcP-Tw\n","html",[62,442,443],{"__ignoreMap":88},[92,444,445],{"class":94,"line":95},[92,446,439],{"class":98},[18,448],{},[21,450,452],{"id":451},"when-to-use","When to use?",[67,454,455,472],{},[70,456,457,460,461],{},[37,458,459],{},"Authorization"," - Each client request includes JWT that can be used to control access to routes and resources.\n",[67,462,463,466,469],{},[70,464,465],{},"The server generates a token that certifies the user identity, and sends it to the client.",[70,467,468],{},"The client will send the token back to the server for every subsequent request that required authentication, so the server knows the request comes from a particular identity.",[70,470,471],{},"Once the request arrives at server. It looks for the token and verifies it.",[70,473,474,477],{},[37,475,476],{},"Information Exchange"," - safely transferring data between multiple servers in your application.",[18,479],{},[21,481,483],{"id":482},"points-to-remember","Points to remember",[67,485,486,498,509,516],{},[70,487,488,489,492,493],{},"JWT is ",[37,490,491],{},"not encrypted",". You can check the payload for the JWT we created on ",[29,494,497],{"href":495,"rel":496},"https:\u002F\u002Fjwt.io\u002F",[33],"jwt.io",[70,499,500,501,504,505,508],{},"JWT are ",[37,502,503],{},"stateless"," and shouldn't be stored in database. Mostly clients store it in local storage but that's really bad way to do it. One feasible way could be to store JWTs inside an ",[62,506,507],{},"httpOnly"," cookie.",[70,510,511,512,515],{},"JSON web tokens should have an ",[37,513,514],{},"expiry time",". In modern applications, once the JWT is expired. a persisten refresh token can be used to regenerate JWT.",[70,517,518,519,522],{},"One should not use JWTs as session tokens. JWTs are relatively large that results in a ",[37,520,521],{},"ton of overhead"," per request.",[18,524],{},[21,526,528],{"id":527},"test-yourself","Test yourself",[11,530,531],{},"A quick check on the JWT basics. Pick an option to see the answer.",[83,533,537],{"className":534,"code":535,"language":536,"meta":88,"style":88},"language-quiz shiki shiki-themes github-light github-dark","[\n  {\n    \"q\": \"How many dot-separated parts make up a compact JWT?\",\n    \"options\": [\"Two\", \"Three\", \"Four\"],\n    \"answer\": 1,\n    \"explain\": \"Header, payload, and signature are separated by dots.\"\n  },\n  {\n    \"q\": \"Which statement about a JWT is correct?\",\n    \"options\": [\"JWT is encrypted\", \"JWT is digitally signed but not encrypted\", \"JWT can never expire\"],\n    \"answer\": 1,\n    \"explain\": \"JWTs are digitally signed so they can be verified and trusted, but they are not encrypted, so use them over HTTPS.\"\n  },\n  {\n    \"q\": \"Which part of a JWT always carries typ: JWT?\",\n    \"options\": [\"Payload\", \"Signature\", \"Header\"],\n    \"answer\": 2,\n    \"explain\": \"The header always includes typ: JWT and the signing algorithm, eg alg: HS256.\"\n  }\n]\n","quiz",[62,538,539,544,549,554,559,564,569,575,580,586,592,597,603,608,613,619,625,631,637,643],{"__ignoreMap":88},[92,540,541],{"class":94,"line":95},[92,542,543],{},"[\n",[92,545,546],{"class":94,"line":184},[92,547,548],{},"  {\n",[92,550,551],{"class":94,"line":200},[92,552,553],{},"    \"q\": \"How many dot-separated parts make up a compact JWT?\",\n",[92,555,556],{"class":94,"line":211},[92,557,558],{},"    \"options\": [\"Two\", \"Three\", \"Four\"],\n",[92,560,561],{"class":94,"line":308},[92,562,563],{},"    \"answer\": 1,\n",[92,565,566],{"class":94,"line":319},[92,567,568],{},"    \"explain\": \"Header, payload, and signature are separated by dots.\"\n",[92,570,572],{"class":94,"line":571},7,[92,573,574],{},"  },\n",[92,576,578],{"class":94,"line":577},8,[92,579,548],{},[92,581,583],{"class":94,"line":582},9,[92,584,585],{},"    \"q\": \"Which statement about a JWT is correct?\",\n",[92,587,589],{"class":94,"line":588},10,[92,590,591],{},"    \"options\": [\"JWT is encrypted\", \"JWT is digitally signed but not encrypted\", \"JWT can never expire\"],\n",[92,593,595],{"class":94,"line":594},11,[92,596,563],{},[92,598,600],{"class":94,"line":599},12,[92,601,602],{},"    \"explain\": \"JWTs are digitally signed so they can be verified and trusted, but they are not encrypted, so use them over HTTPS.\"\n",[92,604,606],{"class":94,"line":605},13,[92,607,574],{},[92,609,611],{"class":94,"line":610},14,[92,612,548],{},[92,614,616],{"class":94,"line":615},15,[92,617,618],{},"    \"q\": \"Which part of a JWT always carries typ: JWT?\",\n",[92,620,622],{"class":94,"line":621},16,[92,623,624],{},"    \"options\": [\"Payload\", \"Signature\", \"Header\"],\n",[92,626,628],{"class":94,"line":627},17,[92,629,630],{},"    \"answer\": 2,\n",[92,632,634],{"class":94,"line":633},18,[92,635,636],{},"    \"explain\": \"The header always includes typ: JWT and the signing algorithm, eg alg: HS256.\"\n",[92,638,640],{"class":94,"line":639},19,[92,641,642],{},"  }\n",[92,644,646],{"class":94,"line":645},20,[92,647,648],{},"]\n",[21,650,652],{"id":651},"resources","Resources",[67,654,655,662,669],{},[70,656,657],{},[29,658,661],{"href":659,"rel":660},"https:\u002F\u002Fjwt.io\u002Fintroduction",[33],"Introduction to JWT",[70,663,664],{},[29,665,668],{"href":666,"rel":667},"https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7519",[33],"RFC by IETF",[70,670,671],{},[29,672,675],{"href":673,"rel":674},"https:\u002F\u002Famzn.to\u002F32kfwRf",[33],"Book: OAuth 2 in Action",[18,677],{},[21,679,681],{"id":680},"summary","Summary",[11,683,684,685,688],{},"In this article, we covered the basics about JWT including its structure. We also covered some key things to remember when working with JWT. Stay tuned for another tutorial where we'll ",[37,686,687],{},"implement JWT using Go"," in a real world application.",[690,691,692],"blockquote",{},[11,693,694,695,700,701,706],{},"Do explore articles on ",[29,696,699],{"href":697,"rel":698},"https:\u002F\u002Fwww.mohitkhare.com\u002Fcategories\u002Fgolang",[33],"Golang"," and ",[29,702,705],{"href":703,"rel":704},"https:\u002F\u002Fwww.mohitkhare.com\u002Fcategories\u002Fsystem%20design",[33],"System Design",". You'll learn something new 💡",[11,708,709],{},"I hope you learned something new. Feel free to suggest improvements ✔️",[11,711,712,713,718],{},"Liked the article? Consider ",[29,714,717],{"href":715,"rel":716},"https:\u002F\u002Fwww.buymeacoffee.com\u002FchHAzigTb",[33],"supporting me"," ☕️",[11,720,721,722,727],{},"I share regular updates and resources on ",[29,723,726],{"href":724,"rel":725},"https:\u002F\u002Ftwitter.com\u002Fmkfeuhrer",[33],"Twitter",". Let's connect!",[11,729,730],{},[37,731,732],{},"Keep exploring 🔎 Keep learning 🚀",[734,735,736],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}",{"title":88,"searchDepth":184,"depth":184,"links":738},[739,745,746,747,748,749],{"id":23,"depth":184,"text":24,"children":740},[741,742,743,744],{"id":56,"depth":200,"text":57},{"id":137,"depth":200,"text":72},{"id":219,"depth":200,"text":75},{"id":121,"depth":200,"text":78},{"id":451,"depth":184,"text":452},{"id":482,"depth":184,"text":483},{"id":527,"depth":184,"text":528},{"id":651,"depth":184,"text":652},{"id":680,"depth":184,"text":681},[751,752],"Programming","Web","JSON Web Tokens are a very compact way to carry information. Learn about JWTs in depth, from its structure to when to use it.",false,"md","blog\u002Fjson-web-token\u002Fjson-web-token-card.webp","jwt, jwt token, json web tokens",{},"json-web-token",true,"\u002Fblog\u002Fjson-web-token",{"title":5,"description":753},"blog\u002Fjson-web-token","2021-11-20","BSrhxVMlrfMod3cPKyGgFH6xthlo6hqvB9lBQA5CQuE",[767,774,780,788,796,802,809,816,822,828,834,840,846,855,861,868,874,880,886,892,898,904,910,916,923,930,936,942,948,954,960,966,972,974,980,986,992,998,1004,1011,1017,1023,1029,1036,1042,1048,1055,1062,1068,1075,1081,1088,1094,1101,1107,1113,1119,1125,1131,1137,1143,1149,1155,1161,1167,1173,1180,1186,1193,1199,1205,1211,1218,1224],{"path":768,"title":769,"description":770,"categories":771,"draft":760,"year":773,"series":6},"\u002Fblog\u002Fai-assisted-workstation","Building an AI-Assisted Personal Workstation","How I built a personal AI workstation: markdown knowledge base, portable agent skills, handoff-driven sessions. What worked, what broke, what I would change.",[772,751],"Productivity","2026-08-26",{"path":775,"title":776,"description":777,"categories":778,"draft":754,"year":779,"series":6},"\u002Fblog\u002Faws-s3-golang","Uploading images to AWS S3 in Golang","In this tutorial I cover how to upload, fetch and manage other operations for objects on AWS S3 in Golang",[699,751],"2020-01-12",{"path":781,"title":782,"description":783,"categories":784,"draft":754,"year":787,"series":6},"\u002Fblog\u002Fbooks-for-engineers","Best Books for Software Engineers","Best Books to help you build you software engineering career - ranging from fundamentats, interview prep to productivity.",[785,786],"Books","Life","2021-12-26",{"path":789,"title":790,"description":791,"categories":792,"draft":754,"year":795,"series":6},"\u002Fblog\u002Fbuilding-acrons","Building Acrons 🚀","Building Acrons, a one-stop tool to decode everyday acronyms like DIY, FOMO, and BRB without losing your flow.",[793,752,794],"Side Projects","Tools","2020-05-26",{"path":797,"title":798,"description":799,"categories":800,"draft":754,"year":801,"series":6},"\u002Fblog\u002Fcap-theorem","CAP Theorem Explained","Learn the concept and misconceptions around popular CAP theorem in system design.",[705,751],"2021-07-26",{"path":803,"title":804,"description":805,"categories":806,"draft":754,"year":808,"series":6},"\u002Fblog\u002Fcode-reviews","Code Review Checklist","Why code reviews matter, and best practices that catch bugs early and keep code quality high before merge.",[807],"Engineering Principles","2020-07-20",{"path":810,"title":811,"description":812,"categories":813,"draft":754,"year":815,"series":6},"\u002Fblog\u002Fdark-mode","Add Dark mode to websites","Dark mode is ❤️️ Add it to your websites with little CSS and JS",[814,752],"Javascript","2020-07-04",{"path":817,"title":818,"description":819,"categories":820,"draft":754,"year":821,"series":6},"\u002Fblog\u002Fdate-time-golang","Working with Date and Time in Go","Learn how to use time in Golang - Multiple formats, locations and using date.",[699,751],"2020-10-09",{"path":823,"title":824,"description":825,"categories":826,"draft":754,"year":827,"series":6},"\u002Fblog\u002Fdefer-in-golang","Understanding Defer In Golang","Learn about defer keyword in golang and how it can help you avoid panics due to bugs.",[699,751],"2021-05-05",{"path":829,"title":830,"description":831,"categories":832,"draft":754,"year":833,"series":6},"\u002Fblog\u002Fenums-golang","Implementing Enums in Golang","Enums are a way to defined set of constant values. Learn how to implement enums in Go using iota with examples.",[699,751],"2021-12-18",{"path":835,"title":836,"description":837,"categories":838,"draft":754,"year":839,"series":6},"\u002Fblog\u002Fenvironment-variable-golang","Guide to Environment variables in Go","Learn what are environment variables and how to use them in Go",[699,751],"2020-08-14",{"path":841,"title":842,"description":843,"categories":844,"draft":754,"year":845,"series":6},"\u002Fblog\u002Ferror-handling-golang","Handle errors the right way — Golang","How to handle errors in golang to make your life easy",[699,751],"2020-01-30",{"path":847,"title":848,"description":849,"categories":850,"draft":754,"year":773,"series":853},"\u002Fblog\u002Ffile-attack-field-guide","How File-Based Attacks Land: A Detection Engineer's Field Guide","A practical taxonomy of how malware and phishing arrive as files, why classic controls miss them, and how detection should think.",[851,852],"Security","Systems",{"name":854,"part":95},"File Attack Deep Dives",{"path":856,"title":857,"description":858,"categories":859,"draft":754,"year":860,"series":6},"\u002Fblog\u002Ffile-upload-golang","Uploading Files in Golang with Multipart Request","Learn how to upload files from your client to server as a multipart request in Golang.",[699,751],"2021-03-13",{"path":862,"title":863,"description":864,"categories":865,"draft":754,"year":867,"series":6},"\u002Fblog\u002Fgit-branch","Git Branch 101","Branching is a new path of development that makes it a lot easier to build features. Learn why and how to use branching in git.",[866,751],"Git","2022-03-20",{"path":869,"title":870,"description":871,"categories":872,"draft":754,"year":873,"series":6},"\u002Fblog\u002Fgit-pull-request-template","Guide to Pull Request Templates","Improve collaboration and code reviews with pull request templates. Blog include PR template and how to create one on github\u002Fgitlab",[866,751],"2023-08-24",{"path":875,"title":876,"description":877,"categories":878,"draft":754,"year":879,"series":6},"\u002Fblog\u002Fgit-remove-sensitive-info","Securing Git: Remove Sensitive Information","Protect your code from security breaches by using BFG tool to remove sensitive information from Git history. Learn how to do it in this comprehensive guide.",[866,751],"2023-10-16",{"path":881,"title":882,"description":883,"categories":884,"draft":754,"year":885,"series":6},"\u002Fblog\u002Fgit-tags-explained","Git tags : Explained","What Git tags are, why and when to use them, and how to start tagging releases in your own projects.",[866,751],"2020-06-18",{"path":887,"title":888,"description":889,"categories":890,"draft":754,"year":891,"series":6},"\u002Fblog\u002Fgo-dependency-injection","Dependency Injection in Go using Wire","Learn about dependency injection, its benefits and how to implement it in Go services using wire",[699,751],"2022-11-26",{"path":893,"title":894,"description":895,"categories":896,"draft":754,"year":897,"series":6},"\u002Fblog\u002Fgo-generics","Introduction to Generics in Go","Learn about generics in Golang, it's benefits and how to implement it in applications.",[699,751],"2022-11-27",{"path":899,"title":900,"description":901,"categories":902,"draft":754,"year":903,"series":6},"\u002Fblog\u002Fgo-in-memory-cache","Building In-Memory Cache in Go","Learn about in-memory caching in Golang, it's benefits and how to implement it with and without generics with a TTL(expiry).",[699,751],"2024-03-28",{"path":905,"title":906,"description":907,"categories":908,"draft":754,"year":909,"series":6},"\u002Fblog\u002Fgo-makefile","Ultimate Makefile for Golang","Boost your productivity and save time with ultimate Makefile for Golang projects.",[699,751],"2024-06-10",{"path":911,"title":912,"description":913,"categories":914,"draft":754,"year":915,"series":6},"\u002Fblog\u002Fgo-middleware","Mastering Middlewares in Golang","Learn about middlewares, their use cases and how to implement them in Golang applications",[699,751],"2022-03-13",{"path":917,"title":918,"description":919,"categories":920,"draft":754,"year":922,"series":6},"\u002Fblog\u002Fgo-naming-conventions","Naming Conventions in Golang","Why naming conventions matter in Go, with best practices and practical examples for clear, readable, maintainable code.",[699,751,921],"Code Quality","2023-05-19",{"path":924,"title":925,"description":926,"categories":927,"draft":754,"year":929,"series":6},"\u002Fblog\u002Fgo-with-redis","Go with Redis","A practical introduction to using Redis with Golang to make your applications faster with in-memory data storage.",[699,928,751],"Database","2020-05-03",{"path":931,"title":932,"description":933,"categories":934,"draft":754,"year":935,"series":6},"\u002Fblog\u002Fgolang-maps","Learn Maps in Golang (with examples)","A complete guide to maps in Golang: creating maps, adding and removing items, iterating, and how map equality works.",[699,751],"2020-09-10",{"path":937,"title":938,"description":939,"categories":940,"draft":754,"year":941,"series":6},"\u002Fblog\u002Fguide-to-cdn","Guide to Content Delivery Network","CDN is one of the backbone of modern world internet infrastructure. Learn about Content Delivery Network, it's working, types and benefits.",[705,751],"2022-01-23",{"path":943,"title":944,"description":945,"categories":946,"draft":754,"year":947,"series":6},"\u002Fblog\u002Fguide-to-rule-engines","Guide to Rule Engines","Rule Engines help in solving changing business requirements with ease. Learn all about Rule engines, it's working, benefits and how to implement one in Golang",[699,751],"2022-09-12",{"path":949,"title":950,"description":951,"categories":952,"draft":754,"year":953,"series":6},"\u002Fblog\u002Fhexagonal-architecture","Guide to Hexagonal Architecture","Learn how to design efficient application with hexagonal architecture with practical example",[705,751],"2020-12-13",{"path":955,"title":956,"description":957,"categories":958,"draft":754,"year":959,"series":6},"\u002Fblog\u002Fhttp-status-codes","Learn HTTP Status Codes","A tour of HTTP response status codes, what each class means, and when to use which code in your applications.",[752,751],"2020-07-30",{"path":961,"title":962,"description":963,"categories":964,"draft":754,"year":965,"series":6},"\u002Fblog\u002Fintroduction-to-goroutines","Introduction to Goroutines","Understand the basics of concurrency and learn how to work with Goroutines in golang.",[699,751],"2021-04-10",{"path":967,"title":968,"description":969,"categories":970,"draft":754,"year":971,"series":6},"\u002Fblog\u002Fjson-in-postgres-with-golang","Storing JSON in Postgres with Golang","Learn how to store JSON objects in Postgres and how to implement it in Golang.",[751,928,699],"2021-02-13",{"path":761,"title":5,"description":753,"categories":973,"draft":754,"year":764,"series":6},[751,752],{"path":975,"title":976,"description":977,"categories":978,"draft":754,"year":979,"series":6},"\u002Fblog\u002Flearn-to-say-no","Learning to say No","Learn why it's important to say 'NO'. How it helps in increasing productivity and explore strategies for saying No",[786,785],"2022-04-09",{"path":981,"title":982,"description":983,"categories":984,"draft":754,"year":985,"series":6},"\u002Fblog\u002Flearn-unlearn-relearn","Learn - Unlearn - Relearn","Unlearning things to learn new is the way to grow. Discover how to do that!",[772,786],"2020-09-25",{"path":987,"title":988,"description":989,"categories":990,"draft":754,"year":991,"series":6},"\u002Fblog\u002Flinting-in-golang","Introduction to Linting in Go","Introduction to improving code quality using linting. Learn how to add linting in your Go projects.",[699,751],"2021-07-07",{"path":993,"title":994,"description":995,"categories":996,"draft":754,"year":997,"series":6},"\u002Fblog\u002Fload-balancing","Load Balancing 101","Complete guide on load balancers explaining the internal working and how does it help in making applications efficient.",[705,751],"2021-05-29",{"path":999,"title":1000,"description":1001,"categories":1002,"draft":754,"year":1003,"series":6},"\u002Fblog\u002Fmaking-decisions-the-right-way","Making Decisions: The right way","Decisions are hard! Learn how to make the right decisions always",[772,786],"2020-06-07",{"path":1005,"title":1006,"description":1007,"categories":1008,"draft":754,"year":1010,"series":6},"\u002Fblog\u002Fmanage-logs-with-logrotate","Using Logrotate to manage logs","Learn how to use logrotate system utility to manage logs with example",[1009,751],"Linux","2020-09-08",{"path":1012,"title":1013,"description":1014,"categories":1015,"draft":754,"year":1016,"series":6},"\u002Fblog\u002Fmarshal-structs-golang","Marshal structs the right way: Golang","Why Golang marshals empty structs into your JSON instead of null, and how to marshal structs the right way.",[699,751],"2020-03-31",{"path":1018,"title":1019,"description":1020,"categories":1021,"draft":754,"year":1022,"series":6},"\u002Fblog\u002Fnotes-almanack-naval","Book Notes : Almanack of Naval Ravikant","My notes\u002Fhighlights from Almanack of Naval Ravikant book by Eric Jorgenson",[785,786],"2020-10-17",{"path":1024,"title":1025,"description":1026,"categories":1027,"draft":754,"year":1028,"series":6},"\u002Fblog\u002Fnotes-anything-you-want","Book Notes : Anything you want","My notes\u002Fhighlights from Anything you want book by Derek Sivers",[785,786],"2021-09-25",{"path":1030,"title":1031,"description":1032,"categories":1033,"draft":754,"year":1035,"series":6},"\u002Fblog\u002Fnotes-getting-real","Book Notes : Getting Real","My notes and highlights from Getting Real by Jason Fried and David Heinemeier Hansson on building web applications.",[785,1034],"Startups","2020-11-03",{"path":1037,"title":1038,"description":1039,"categories":1040,"draft":754,"year":1041,"series":6},"\u002Fblog\u002Fnotes-hell-yeah-or-no","Book Notes : Hell Yeah or No","My notes\u002Fhighlights from Hell Yeah or No book by Derek Sivers",[785,786],"2020-09-16",{"path":1043,"title":1044,"description":1045,"categories":1046,"draft":754,"year":1047,"series":6},"\u002Fblog\u002Fnotes-how-to-be-a-capitalist","Book Notes : How to Be a Capitalist Without Any Capital","My notes\u002Fhighlights from How to Be a Capitalist Without Any Capital by Nathan Latka",[785,1034],"2020-01-07",{"path":1049,"title":1050,"description":1051,"categories":1052,"draft":754,"year":1054,"series":6},"\u002Fblog\u002Fnotes-lean-b2b","Book Notes : Lean B2B","My notes and highlights from Lean B2B by Étienne Garbugli on assessing markets, building MVPs, and selling to businesses.",[785,1053],"Entrepreneurship","2022-07-02",{"path":1056,"title":1057,"description":1058,"categories":1059,"draft":754,"year":1061,"series":6},"\u002Fblog\u002Fnotes-lets-talk-money","Book Notes : Let's Talk Money","My notes and highlights from Let's Talk Money by Monica Halan on managing personal finances and savings.",[785,1060],"Personal Finance","2021-02-26",{"path":1063,"title":1064,"description":1065,"categories":1066,"draft":754,"year":1067,"series":6},"\u002Fblog\u002Fnotes-obviously-awesome","Book Notes : Obviously Awesome","My notes and highlights from Obviously Awesome by April Dunford on product positioning and marketing strategy.",[785,1034],"2020-04-26",{"path":1069,"title":1070,"description":1071,"categories":1072,"draft":754,"year":1074,"series":6},"\u002Fblog\u002Fnotes-refactoring-ui","Book Notes: Refactoring UI","My notes and highlights from Refactoring UI by Adam Wathan and Steve Schoger, full of practical design tips for engineers.",[785,1073],"Design","2020-05-09",{"path":1076,"title":1077,"description":1078,"categories":1079,"draft":754,"year":1080,"series":6},"\u002Fblog\u002Fnotes-rework","Book Notes: Rework","My notes and highlights from Rework by Jason Fried and David Heinemeier Hansson on a better way to succeed in business.",[785,1034],"2021-04-14",{"path":1082,"title":1083,"description":1084,"categories":1085,"draft":754,"year":1087,"series":6},"\u002Fblog\u002Fone-on-one-meetings","Guide to Effective 1:1 Meetings","One on One meetings are important for your personal & professional growth. Learn how to master 1:1s with your manager and peers.",[1086,772],"Career","2023-03-05",{"path":1089,"title":1090,"description":1091,"categories":1092,"draft":754,"year":1093,"series":6},"\u002Fblog\u002Fpersonal-okrs","Personal OKRs for Success","Why one should set personal OKRs and how to achieve success with them",[772,786],"2020-06-27",{"path":1095,"title":1096,"description":1097,"categories":1098,"draft":754,"year":1100,"series":6},"\u002Fblog\u002Fpoker-tips","Poker Tips: Johns Hopkins Poker Class","Notes from Johns Hopkins poker course. This guide will help you improve in Poker and win some large pots.",[786,1099],"Poker","2020-06-13",{"path":1102,"title":1103,"description":1104,"categories":1105,"draft":754,"year":1106,"series":6},"\u002Fblog\u002Fpomodoro","Get work done: The Pomo Way","Learn to focus and get productive by following the Pomodoro Technique",[772],"2020-10-24",{"path":1108,"title":1109,"description":1110,"categories":1111,"draft":754,"year":1112,"series":6},"\u002Fblog\u002Fpostgres-constraints","Postgres Constraints","Constraints are line of defense for database. Explore various types of constrainsts in postgres",[928,751],"2020-11-07",{"path":1114,"title":1115,"description":1116,"categories":1117,"draft":754,"year":1118,"series":6},"\u002Fblog\u002Fppf-explained","PPF Explained","Learn basics about Public Provident Fund and why you should invest",[786,1060],"2020-12-24",{"path":1120,"title":1121,"description":1122,"categories":1123,"draft":754,"year":1124,"series":6},"\u002Fblog\u002Fproductivity-chrome-extensions","Boost Productivity with Chrome Extensions","Utitizing chrome extensions to boost your productivity!",[772,794,752],"2020-04-24",{"path":1126,"title":1127,"description":1128,"categories":1129,"draft":754,"year":1130,"series":6},"\u002Fblog\u002Fproductivity-in-vscode","Improve your productivity with VS Code","Key VS Code features like the integrated terminal, shortcuts, and extensions that improved my everyday productivity.",[772,751],"2020-03-12",{"path":1132,"title":1133,"description":1134,"categories":1135,"draft":754,"year":1136,"series":6},"\u002Fblog\u002Freading-101","Improving Reading 101","Why reading matters, how to build a reading habit, and what to read next - from my own journey into books.",[785,786],"2020-04-04",{"path":1138,"title":1139,"description":1140,"categories":1141,"draft":754,"year":1142,"series":6},"\u002Fblog\u002Freverse-proxy","Understanding Reverse Proxy","Learn about reverse proxy, how it is different from forward proxy and explore advantages of using it in system design.",[705,751],"2021-10-03",{"path":1144,"title":1145,"description":1146,"categories":1147,"draft":754,"year":1148,"series":6},"\u002Fblog\u002Frunning-periodic-background-task-golang","Running periodic background tasks in Golang","How to run periodic background tasks in Golang by combining cron-style scheduling with background execution.",[699,751],"2019-11-21",{"path":1150,"title":1151,"description":1152,"categories":1153,"draft":754,"year":1154,"series":6},"\u002Fblog\u002Fsessions-in-golang","Sessions using Golang and Redis","How cookies and sessions work, and how to implement persistent login sessions in Golang using Redis.",[699,928,751],"2020-02-25",{"path":1156,"title":1157,"description":1158,"categories":1159,"draft":754,"year":1160,"series":6},"\u002Fblog\u002Fsolid-dry-kiss-yagni","Solid Dry Kiss Yagni","An introduction to the SOLID, DRY, KISS, and YAGNI principles and how they help you write cleaner, robust code.",[807],"2020-07-17",{"path":1162,"title":1163,"description":1164,"categories":1165,"draft":754,"year":1166,"series":6},"\u002Fblog\u002Fstack-in-golang","Implement Stack in Golang","Learn how to implement stack data structure in Golang (Full code)",[699,751],"2020-09-14",{"path":1168,"title":1169,"description":1170,"categories":1171,"draft":754,"year":1172,"series":6},"\u002Fblog\u002Fstart-oss-today","Start your Open Source journey today","Start your OSS journey with intro to GIT. Participate in Hacktoberfest!",[866,751],"2020-09-19",{"path":1174,"title":1175,"description":1176,"categories":1177,"draft":754,"year":1179,"series":6},"\u002Fblog\u002Fsticky-social-bar","Sticky social share component in HTML","Learn how to build a social media sharing component in HTML and add it to your website.",[751,1178],"Frontend","2021-02-05",{"path":1181,"title":1182,"description":1183,"categories":1184,"draft":754,"year":1185,"series":6},"\u002Fblog\u002Fterm-insurance","Term insurance Simplified","Everything you need to know before you buy a term insurance.",[786,1060],"2020-11-29",{"path":1187,"title":1188,"description":1189,"categories":1190,"draft":754,"year":1192,"series":6},"\u002Fblog\u002Fterminal-output-with-redirection","Handling terminal outputs with Redirection","Learn how to handle terminal outputs with Redirection and saving it to files",[1009,1191,751],"Terminal","2020-09-06",{"path":1194,"title":1195,"description":1196,"categories":1197,"draft":754,"year":1198,"series":6},"\u002Fblog\u002Fthink-and-grow-rich","Book Notes: Think and Grow Rich","My notes and highlights from Think and Grow Rich by Napoleon Hill, covering its process for building wealth.",[785,786],"2020-05-19",{"path":1200,"title":1201,"description":1202,"categories":1203,"draft":754,"year":1204,"series":6},"\u002Fblog\u002Ftransactions-postgres-golang","Transactions on Postgres with Golang","Performing Postgres database operations in Golang with GORM, from basic queries to full transaction support.",[699,928,751],"2020-03-18",{"path":1206,"title":1207,"description":1208,"categories":1209,"draft":754,"year":1210,"series":6},"\u002Fblog\u002Fwaitgroups-in-golang","WaitGroups in Golang","Learn about WaitGroups in golang and how to use them to perform concurrent operations without blocking the main thread.",[699,751],"2022-05-31",{"path":1212,"title":1213,"description":1214,"categories":1215,"draft":754,"year":1217,"series":6},"\u002Fblog\u002Fwhat-i-use","What I Use: Products and Softwares","List of what I use in my day to day life ranging from terminal, editors, softwares, devices to accessories",[786,1216],"Tech","2024-06-01",{"path":1219,"title":1220,"description":1221,"categories":1222,"draft":754,"year":1223,"series":6},"\u002Fblog\u002Fyear-in-review-2020","Year in Review: 2020","It's a wrap! 2020 was a crazy year, See how my year went!",[786],"2020-12-31",{"path":1225,"title":1226,"description":1227,"categories":1228,"draft":754,"year":1229,"series":6},"\u002Fblog\u002Fyear-in-review-2021","Year in Review: 2021","It's a wrap! 2021 was a mixed bag, full of ups and downs. Key Goal for 2022: Start now!",[786],"2021-12-31",1788114952211]