{"id":2174,"date":"2019-12-02T19:15:00","date_gmt":"2019-12-02T19:15:00","guid":{"rendered":"https:\/\/www.htmlgoodies.com\/uncategorized\/an-introduction-to-json-web-tokens-jwt\/"},"modified":"2019-12-02T19:15:00","modified_gmt":"2019-12-02T19:15:00","slug":"an-introduction-to-json-web-tokens-jwt","status":"publish","type":"post","link":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/","title":{"rendered":"An Introduction to JSON Web Tokens (JWT)"},"content":{"rendered":"

\"JWT<\/p>\n

As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless the intention is to actually leave it open.<\/p>\n

There are many other points to note, such as using Refresh Tokens, external authentication via Facebook, Google and Twitter for example.<\/p>\n

About the Author<\/h3>\n

Diogo Souza<\/strong> works as a Java Developer at PagSeguro and has worked for companies such as Indra Company, Atlantic Institute and Ebix LA. He is also an Android trainer, speaker at events on Java and mobile world.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"

As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless the intention is to actually leave it open. There are many other points to note, such as using Refresh Tokens, external authentication via Facebook, Google and Twitter for example. About […]<\/p>\n","protected":false},"author":43,"featured_media":1290,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[30620,30625],"tags":[960,5286,3385,3447],"b2b_audience":[29,35,36,37,34],"b2b_industry":[],"b2b_product":[68,78,94,67,99,113,114,117],"acf":[],"yoast_head":"\nAn Introduction to JSON Web Tokens (JWT) | HTML Goodies<\/title>\n<meta name=\"description\" content=\"As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An Introduction to JSON Web Tokens (JWT) | HTML Goodies\" \/>\n<meta property=\"og:description\" content=\"As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/\" \/>\n<meta property=\"og:site_name\" content=\"HTML Goodies\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-02T19:15:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"290\" \/>\n\t<meta property=\"og:image:height\" content=\"195\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@htmlgoodies\" \/>\n<meta name=\"twitter:site\" content=\"@htmlgoodies\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diogo Souza\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.htmlgoodies.com\/#organization\",\"name\":\"HTML Goodies\",\"url\":\"https:\/\/www.htmlgoodies.com\/\",\"sameAs\":[\"https:\/\/twitter.com\/htmlgoodies\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.htmlgoodies.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/03\/HTMLg_weblogo_MobileLogo.png\",\"contentUrl\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/03\/HTMLg_weblogo_MobileLogo.png\",\"width\":584,\"height\":136,\"caption\":\"HTML Goodies\"},\"image\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.htmlgoodies.com\/#website\",\"url\":\"https:\/\/www.htmlgoodies.com\/\",\"name\":\"HTML Goodies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.htmlgoodies.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#primaryimage\",\"url\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg\",\"contentUrl\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg\",\"width\":290,\"height\":195},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#webpage\",\"url\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/\",\"name\":\"An Introduction to JSON Web Tokens (JWT) | HTML Goodies\",\"isPartOf\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#primaryimage\"},\"datePublished\":\"2019-12-02T19:15:00+00:00\",\"dateModified\":\"2019-12-02T19:15:00+00:00\",\"description\":\"As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless\",\"breadcrumb\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.htmlgoodies.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"An Introduction to JSON Web Tokens (JWT)\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/#\/schema\/person\/2d48b79740f645515012ecdebf183df3\"},\"headline\":\"An Introduction to JSON Web Tokens (JWT)\",\"datePublished\":\"2019-12-02T19:15:00+00:00\",\"dateModified\":\"2019-12-02T19:15:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#webpage\"},\"wordCount\":102,\"publisher\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg\",\"keywords\":[\"APIs\",\"authentication\",\"JavaScript\",\"JSON\"],\"articleSection\":[\"Javascript\",\"Security\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.htmlgoodies.com\/#\/schema\/person\/2d48b79740f645515012ecdebf183df3\",\"name\":\"Diogo Souza\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.htmlgoodies.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/12\/Website_Avatar__HTMLGood_3-copy-2-150x150.png\",\"contentUrl\":\"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/12\/Website_Avatar__HTMLGood_3-copy-2-150x150.png\",\"caption\":\"Diogo Souza\"},\"url\":\"https:\/\/www.htmlgoodies.com\/author\/diogo-souza\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"An Introduction to JSON Web Tokens (JWT) | HTML Goodies","description":"As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/","og_locale":"en_US","og_type":"article","og_title":"An Introduction to JSON Web Tokens (JWT) | HTML Goodies","og_description":"As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless","og_url":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/","og_site_name":"HTML Goodies","article_published_time":"2019-12-02T19:15:00+00:00","og_image":[{"width":290,"height":195,"url":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_creator":"@htmlgoodies","twitter_site":"@htmlgoodies","twitter_misc":{"Written by":"Diogo Souza"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/www.htmlgoodies.com\/#organization","name":"HTML Goodies","url":"https:\/\/www.htmlgoodies.com\/","sameAs":["https:\/\/twitter.com\/htmlgoodies"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.htmlgoodies.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/03\/HTMLg_weblogo_MobileLogo.png","contentUrl":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/03\/HTMLg_weblogo_MobileLogo.png","width":584,"height":136,"caption":"HTML Goodies"},"image":{"@id":"https:\/\/www.htmlgoodies.com\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/www.htmlgoodies.com\/#website","url":"https:\/\/www.htmlgoodies.com\/","name":"HTML Goodies","description":"","publisher":{"@id":"https:\/\/www.htmlgoodies.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.htmlgoodies.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#primaryimage","url":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg","contentUrl":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg","width":290,"height":195},{"@type":"WebPage","@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#webpage","url":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/","name":"An Introduction to JSON Web Tokens (JWT) | HTML Goodies","isPartOf":{"@id":"https:\/\/www.htmlgoodies.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#primaryimage"},"datePublished":"2019-12-02T19:15:00+00:00","dateModified":"2019-12-02T19:15:00+00:00","description":"As you can see, authentication in APIs is vitally important. We cannot expose our APIs to the world without guaranteeing at least minimal security, unless","breadcrumb":{"@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.htmlgoodies.com\/"},{"@type":"ListItem","position":2,"name":"An Introduction to JSON Web Tokens (JWT)"}]},{"@type":"Article","@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#article","isPartOf":{"@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#webpage"},"author":{"@id":"https:\/\/www.htmlgoodies.com\/#\/schema\/person\/2d48b79740f645515012ecdebf183df3"},"headline":"An Introduction to JSON Web Tokens (JWT)","datePublished":"2019-12-02T19:15:00+00:00","dateModified":"2019-12-02T19:15:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#webpage"},"wordCount":102,"publisher":{"@id":"https:\/\/www.htmlgoodies.com\/#organization"},"image":{"@id":"https:\/\/www.htmlgoodies.com\/javascript\/an-introduction-to-json-web-tokens-jwt\/#primaryimage"},"thumbnailUrl":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/04\/ThinkstockPhotos-465986085_290x195.jpg","keywords":["APIs","authentication","JavaScript","JSON"],"articleSection":["Javascript","Security"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.htmlgoodies.com\/#\/schema\/person\/2d48b79740f645515012ecdebf183df3","name":"Diogo Souza","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.htmlgoodies.com\/#\/schema\/person\/image\/","url":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/12\/Website_Avatar__HTMLGood_3-copy-2-150x150.png","contentUrl":"https:\/\/www.htmlgoodies.com\/wp-content\/uploads\/2021\/12\/Website_Avatar__HTMLGood_3-copy-2-150x150.png","caption":"Diogo Souza"},"url":"https:\/\/www.htmlgoodies.com\/author\/diogo-souza\/"}]}},"_links":{"self":[{"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/posts\/2174"}],"collection":[{"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/comments?post=2174"}],"version-history":[{"count":0,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/posts\/2174\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/media\/1290"}],"wp:attachment":[{"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/media?parent=2174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/categories?post=2174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/tags?post=2174"},{"taxonomy":"b2b_audience","embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/b2b_audience?post=2174"},{"taxonomy":"b2b_industry","embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/b2b_industry?post=2174"},{"taxonomy":"b2b_product","embeddable":true,"href":"https:\/\/www.htmlgoodies.com\/wp-json\/wp\/v2\/b2b_product?post=2174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}