{"id":3825,"date":"2021-10-05T20:45:49","date_gmt":"2021-10-05T23:45:49","guid":{"rendered":"https:\/\/renanmf.com\/?p=3825"},"modified":"2021-10-05T20:45:49","modified_gmt":"2021-10-05T23:45:49","slug":"jwt-in-python","status":"publish","type":"post","link":"https:\/\/renanmf.com\/jwt-in-python\/","title":{"rendered":"JWT in Python"},"content":{"rendered":"<p>JWT stands for JSON Web Token, which is a standard that defines how to send JSON objects compactly.<\/p>\n<p>The data in a JWT can be validated at any given time since the token is digitally signed.<\/p>\n<p>The JWT has three parts separated by dots <code>.<\/code>: Header, Payload, and Signature.<\/p>\n<h2>Header<\/h2>\n<p>The Header defines the information about the JSON object.<\/p>\n<p>In this case, we are saying this is a JWT token and its signature algorithm, HS256.<\/p>\n<pre><code>{\n  &quot;alg&quot;: &quot;HS256&quot;,\n  &quot;typ&quot;: &quot;JWT&quot;\n}<\/code><\/pre>\n<h2>Payload<\/h2>\n<p>The Payload is a JSON object with information about the entity, usually used for the authenticated user info.<\/p>\n<p>We can have three types of Claims: Registered, Public, and Private.<\/p>\n<p>The most common Registered Claims are iss (issuer), exp (expiration time), and sub (subject).<\/p>\n<p>The Public Claims are the ones we use in our applications and you can define them as you need.<\/p>\n<p>Finallt, Private claims are for sharing info between applications.<\/p>\n<p>DO NOT store sensitive information in your tokens.<\/p>\n<p>Here is an example of a valid token:<\/p>\n<pre><code>{\n  &quot;sub&quot;: &quot;000000&quot;,\n  &quot;name&quot;: &quot;Admin&quot;,\n  &quot;admin&quot;: true\n}<\/code><\/pre>\n<h2>Signature<\/h2>\n<p>The signature is simply the concatenation of both the Header and Payload, hashed using base64UrlEncode.<\/p>\n<p>It&#8217;s important to notice the secret key to make it more secure.<\/p>\n<pre><code>HMACSHA256(\n  base64UrlEncode(header) + &quot;.&quot; +\n  base64UrlEncode(payload),\n  secret)<\/code><\/pre>\n<h2>Final Result<\/h2>\n<p>The final result is a token with three sections separated by a dot <code>.<\/code><\/p>\n<p>The first section is the hashed header, then the payload, and finally the signature.<\/p>\n<pre><code>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c<\/code><\/pre>\n<h2>Implementing JWT in Python<\/h2>\n<p>To implement JWT in Python we are going to use the lib <a href=\"https:\/\/pyjwt.readthedocs.io\/en\/stable\/\">PyJWT<\/a>.<\/p>\n<p>Install it using pip as follows:<\/p>\n<pre><code>pip install PyJWT==2.1.0<\/code><\/pre>\n<p>Then we are going to import it as <code>jwt<\/code>.<\/p>\n<p>As explained before, we are going to need a secret key, the more random the better as you can see defined in the variable <code>JWT_SECRET_KEY<\/code>.<\/p>\n<p>Define the algorithm, as you can see in the <code>JWT_ALGORITHM<\/code> variable.<\/p>\n<p>And finally, define for how long the token will be valid, in the example below it will last 2 days (60 minutes <em> 24 hours <\/em> 2 days).<\/p>\n<p>The function <code>create_jwt_token<\/code> receives a username and role that will be assigned to <code>sub<\/code> and <code>role<\/code> in our token.<\/p>\n<p>The <code>exp<\/code> value will be calculated by using the datetime and timedelta.<\/p>\n<p>We can then call <code>jwt.encode<\/code> passing the <code>jwt_payload<\/code>, the secret key, and the algorithm of our choice.<\/p>\n<p>The result will be a token that will expire in two days.<\/p>\n<p>Then we create another function <code>check_jwt_token<\/code> that expects a token as a string.<\/p>\n<p>We call <code>jwt.decode<\/code> from PyJWT, pass the token, the secret key, and the algorithm to have the info back in plain values (not hashed).<\/p>\n<p>This way we can recover the values of <code>username<\/code>, <code>role<\/code>, and <code>expiration<\/code>.<\/p>\n<p>Then we check <code>if time.time() &lt; expiration:<\/code>, this will return <code>true<\/code> if the token is not expired.<\/p>\n<p>Then we make a second check to match the username with one we might have in our database.<\/p>\n<p>The function <code>check_jwt_username(username)<\/code> is a generic function that simply takes the username and looks for it in a user table in a database, you could implement it in any way you need.<\/p>\n<p>If the token is not valid, an <a href=\"https:\/\/renanmf.com\/handling-exceptions-python\/\">Exception<\/a> will be thrown and the code will return <code>False<\/code>.<\/p>\n<p>If the token has expired or if the username is not found in the database, the function will also return <code>False<\/code>.<\/p>\n<pre><code class=\"language-python\">import jwt\nfrom datetime import datetime, timedelta\nimport time\n\nJWT_SECRET_KEY = &quot;MY_SUPER_SECRET_KEY&quot;\nJWT_ALGORITHM = &quot;HS256&quot;\nJWT_EXPIRATION_TIME_MINUTES = 60 * 24 * 2\n\n# Create access JWT token\ndef create_jwt_token(username, role):\n    expiration = datetime.utcnow() + timedelta(minutes=JWT_EXPIRATION_TIME_MINUTES)\n    jwt_payload = {&quot;sub&quot;: username, &quot;role&quot;: role, &quot;exp&quot;: expiration}\n    jwt_token = jwt.encode(jwt_payload, JWT_SECRET_KEY, algorithm=JWT_ALGORITHM)\n\n    return jwt_token\n\n# Check whether JWT token is correct\ndef check_jwt_token(token):\n    try:\n        jwt_payload = jwt.decode(token, JWT_SECRET_KEY, algorithms=JWT_ALGORITHM)\n        username = jwt_payload.get(&quot;sub&quot;)\n        role = jwt_payload.get(&quot;role&quot;)\n        expiration = jwt_payload.get(&quot;exp&quot;)\n        if time.time() &lt; expiration:\n            is_valid = check_jwt_username(username)\n            if is_valid:\n                return True\n            else:\n                return False\n        else:\n            return False\n    except Exception as e:\n        return False\n<\/code><\/pre>\n<p>This is the most generic and simple way to work with JWT tokens in Python.<\/p>\n<p>One could use this to implement JWT in any framework, like Flask or FastAPI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JWT stands for JSON Web Token, which is a standard that defines how to send JSON objects compactly. The data in a JWT can be validated at any given time since the token is digitally signed. The JWT has three parts separated by dots .: Header, Payload, and Signature. Header The Header defines the information [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3893,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[6],"class_list":["post-3825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JWT in Python<\/title>\n<meta name=\"description\" content=\"Learn what a JWT is, how it works, and how to implement it in Python.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/renanmf.com\/jwt-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JWT in Python\" \/>\n<meta property=\"og:description\" content=\"Learn what a JWT is, how it works, and how to implement it in Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/renanmf.com\/jwt-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Renan Moura - Software Engineering\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/renanmouraf\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-05T23:45:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/renanmf.com\/wp-content\/uploads\/2021\/10\/Banner-Post-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2240\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Renan Moura\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/renanmouraf\" \/>\n<meta name=\"twitter:site\" content=\"@renanmouraf\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Renan Moura\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/\"},\"author\":{\"name\":\"Renan Moura\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/#\\\/schema\\\/person\\\/1a6fd46256318d200c1c8a867448e5a8\"},\"headline\":\"JWT in Python\",\"datePublished\":\"2021-10-05T23:45:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/\"},\"wordCount\":535,\"publisher\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/renanmf.com\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Banner-Post-2.jpg\",\"keywords\":[\"python\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/\",\"url\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/\",\"name\":\"JWT in Python\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/renanmf.com\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Banner-Post-2.jpg\",\"datePublished\":\"2021-10-05T23:45:49+00:00\",\"description\":\"Learn what a JWT is, how it works, and how to implement it in Python.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/renanmf.com\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Banner-Post-2.jpg\",\"contentUrl\":\"https:\\\/\\\/renanmf.com\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/Banner-Post-2.jpg\",\"width\":2240,\"height\":1260,\"caption\":\"jwt in python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/jwt-in-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\\\/\\\/renanmf.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JWT in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/#website\",\"url\":\"https:\\\/\\\/renanmf.com\\\/\",\"name\":\"Renan Moura - Software Engineering\",\"description\":\"Software development, machine learning\",\"publisher\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/renanmf.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/#organization\",\"name\":\"Renan Moura\",\"url\":\"https:\\\/\\\/renanmf.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/renanmf.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/me-e1583179172701.jpeg\",\"contentUrl\":\"https:\\\/\\\/renanmf.com\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/me-e1583179172701.jpeg\",\"width\":120,\"height\":120,\"caption\":\"Renan Moura\"},\"image\":{\"@id\":\"https:\\\/\\\/renanmf.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/renanmouraf\",\"https:\\\/\\\/x.com\\\/renanmouraf\",\"https:\\\/\\\/instagram.com\\\/renanmouraf\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/renanmouraf\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/renanmf.com\\\/#\\\/schema\\\/person\\\/1a6fd46256318d200c1c8a867448e5a8\",\"name\":\"Renan Moura\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efb78bdd04aa5627f80307aed5a9b31989d901c536d1e014a29a3c3591338af8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efb78bdd04aa5627f80307aed5a9b31989d901c536d1e014a29a3c3591338af8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efb78bdd04aa5627f80307aed5a9b31989d901c536d1e014a29a3c3591338af8?s=96&d=mm&r=g\",\"caption\":\"Renan Moura\"},\"description\":\"I'm a Software Engineer working in the industry for a decade now. I like to solve problems with as little code as possible. I\u2019m interested in solving all sorts of problems with technology in creative and innovative ways. From everyday shell scripts to machine learning models. I write about Software Development, Machine Learning, and Career in tech.\",\"sameAs\":[\"https:\\\/\\\/renanmf.com\\\/\",\"https:\\\/\\\/www.instagram.com\\\/renanmouraf\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/renanmouraf\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/renanmouraf\"],\"url\":\"https:\\\/\\\/renanmf.com\\\/author\\\/renanmoura\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JWT in Python","description":"Learn what a JWT is, how it works, and how to implement it in Python.","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:\/\/renanmf.com\/jwt-in-python\/","og_locale":"en_US","og_type":"article","og_title":"JWT in Python","og_description":"Learn what a JWT is, how it works, and how to implement it in Python.","og_url":"https:\/\/renanmf.com\/jwt-in-python\/","og_site_name":"Renan Moura - Software Engineering","article_publisher":"https:\/\/www.facebook.com\/renanmouraf","article_published_time":"2021-10-05T23:45:49+00:00","og_image":[{"width":2240,"height":1260,"url":"https:\/\/renanmf.com\/wp-content\/uploads\/2021\/10\/Banner-Post-2.jpg","type":"image\/jpeg"}],"author":"Renan Moura","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/renanmouraf","twitter_site":"@renanmouraf","twitter_misc":{"Written by":"Renan Moura","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/renanmf.com\/jwt-in-python\/#article","isPartOf":{"@id":"https:\/\/renanmf.com\/jwt-in-python\/"},"author":{"name":"Renan Moura","@id":"https:\/\/renanmf.com\/#\/schema\/person\/1a6fd46256318d200c1c8a867448e5a8"},"headline":"JWT in Python","datePublished":"2021-10-05T23:45:49+00:00","mainEntityOfPage":{"@id":"https:\/\/renanmf.com\/jwt-in-python\/"},"wordCount":535,"publisher":{"@id":"https:\/\/renanmf.com\/#organization"},"image":{"@id":"https:\/\/renanmf.com\/jwt-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/renanmf.com\/wp-content\/uploads\/2021\/10\/Banner-Post-2.jpg","keywords":["python"],"articleSection":["Python"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/renanmf.com\/jwt-in-python\/","url":"https:\/\/renanmf.com\/jwt-in-python\/","name":"JWT in Python","isPartOf":{"@id":"https:\/\/renanmf.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/renanmf.com\/jwt-in-python\/#primaryimage"},"image":{"@id":"https:\/\/renanmf.com\/jwt-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/renanmf.com\/wp-content\/uploads\/2021\/10\/Banner-Post-2.jpg","datePublished":"2021-10-05T23:45:49+00:00","description":"Learn what a JWT is, how it works, and how to implement it in Python.","breadcrumb":{"@id":"https:\/\/renanmf.com\/jwt-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/renanmf.com\/jwt-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/renanmf.com\/jwt-in-python\/#primaryimage","url":"https:\/\/renanmf.com\/wp-content\/uploads\/2021\/10\/Banner-Post-2.jpg","contentUrl":"https:\/\/renanmf.com\/wp-content\/uploads\/2021\/10\/Banner-Post-2.jpg","width":2240,"height":1260,"caption":"jwt in python"},{"@type":"BreadcrumbList","@id":"https:\/\/renanmf.com\/jwt-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/renanmf.com\/"},{"@type":"ListItem","position":2,"name":"JWT in Python"}]},{"@type":"WebSite","@id":"https:\/\/renanmf.com\/#website","url":"https:\/\/renanmf.com\/","name":"Renan Moura - Software Engineering","description":"Software development, machine learning","publisher":{"@id":"https:\/\/renanmf.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/renanmf.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/renanmf.com\/#organization","name":"Renan Moura","url":"https:\/\/renanmf.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/renanmf.com\/#\/schema\/logo\/image\/","url":"https:\/\/renanmf.com\/wp-content\/uploads\/2020\/03\/me-e1583179172701.jpeg","contentUrl":"https:\/\/renanmf.com\/wp-content\/uploads\/2020\/03\/me-e1583179172701.jpeg","width":120,"height":120,"caption":"Renan Moura"},"image":{"@id":"https:\/\/renanmf.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/renanmouraf","https:\/\/x.com\/renanmouraf","https:\/\/instagram.com\/renanmouraf","https:\/\/www.linkedin.com\/in\/renanmouraf\/"]},{"@type":"Person","@id":"https:\/\/renanmf.com\/#\/schema\/person\/1a6fd46256318d200c1c8a867448e5a8","name":"Renan Moura","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/efb78bdd04aa5627f80307aed5a9b31989d901c536d1e014a29a3c3591338af8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/efb78bdd04aa5627f80307aed5a9b31989d901c536d1e014a29a3c3591338af8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/efb78bdd04aa5627f80307aed5a9b31989d901c536d1e014a29a3c3591338af8?s=96&d=mm&r=g","caption":"Renan Moura"},"description":"I'm a Software Engineer working in the industry for a decade now. I like to solve problems with as little code as possible. I\u2019m interested in solving all sorts of problems with technology in creative and innovative ways. From everyday shell scripts to machine learning models. I write about Software Development, Machine Learning, and Career in tech.","sameAs":["https:\/\/renanmf.com\/","https:\/\/www.instagram.com\/renanmouraf\/","https:\/\/www.linkedin.com\/in\/renanmouraf\/","https:\/\/x.com\/https:\/\/twitter.com\/renanmouraf"],"url":"https:\/\/renanmf.com\/author\/renanmoura\/"}]}},"_links":{"self":[{"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/posts\/3825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/comments?post=3825"}],"version-history":[{"count":15,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/posts\/3825\/revisions"}],"predecessor-version":[{"id":3892,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/posts\/3825\/revisions\/3892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/media\/3893"}],"wp:attachment":[{"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/media?parent=3825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/categories?post=3825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/renanmf.com\/wp-json\/wp\/v2\/tags?post=3825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}