{"componentChunkName":"component---src-templates-tag-js","path":"/tags/json/","result":{"data":{"site":{"siteMetadata":{"title":"LoginRadius Blog"}},"allMarkdownRemark":{"totalCount":1,"edges":[{"node":{"fields":{"slug":"/engineering/guest-post/what-are-jwt-jws-jwe-jwk-jwa/"},"html":"<p>JSON (JavaScript Object Notation) is a text-based, language-independent format that is easily understandable by humans and machines.</p>\n<p>JOSE (Javascript Object Signing and Encryption) is a framework used to facilitate the secure transfer of claims between any two parties. Its specifications provide a general approach to encryption of any content, not necessarily in JSON. However, it is built on JSON for easy use in web applications. Let's explore some of these specifications.</p>\n<h2 id=\"jwt--json-web-token\" style=\"position:relative;\"><a href=\"#jwt--json-web-token\" aria-label=\"jwt  json web token permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JWT — JSON Web Token</h2>\n<p><a href=\"https://www.loginradius.com/blog/engineering/guest-post/jwt-authentication-best-practices-and-when-to-use/\">JWT</a> is a standard mechanism used for authentication. It is compact and URL-safe to represent the claims to be transferred between two parties. Claims are a set of key/value pairs that provide a target system with information about a client to apply an appropriate level of access control to its resources. Claim names could be Registered (IANA), Public, or Private. Some registered claim names are:</p>\n<ul>\n<li>\"iss\": Issuer claim — identifies the issuer of the claim</li>\n<li>\"sub\": Subject claim — identifying the subject of a claim</li>\n<li>\"jti\": JWT ID — Uniquely identify a claim</li>\n</ul>\n<h3 id=\"structure\" style=\"position:relative;\"><a href=\"#structure\" aria-label=\"structure permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Structure</h3>\n<p>JWT is mainly composed of three parts: header, payload, and signature that are Base64 URL-encoded.</p>\n<ul>\n<li>The header is used to identify the algorithm used to generate a signature.</li>\n<li>The payload consists of the claims and signature (secret key) used to validate the token.</li>\n<li>The structure of sending the information could be Serialized or Deserialized. In the Serialized form, JWT is represented as a string containing the header, payload, and signature separated by dots.</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">[header].[payload].[signature]</span></code></pre>\n<p>Here's a simple JWT example.</p>\n<p>JSON Web Token:</p>\n<p><code>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MTIzNDU2Nzg5LCJuYW1lIjoiSm9zZXBoIn0.OpOSSw7e485LOP5PrzScxHb7SR6sAOMRckfFwi4rp7o</code></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">header:</span>\n<span class=\"grvsc-line\">{</span>\n<span class=\"grvsc-line\">  &quot;alg&quot; : &quot;HS256&quot;,                      Header</span>\n<span class=\"grvsc-line\">                            ---------------------------------&gt;  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9</span>\n<span class=\"grvsc-line\">  &quot;typ&quot; : &quot;JWT&quot;</span>\n<span class=\"grvsc-line\">}</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">Payload:</span>\n<span class=\"grvsc-line\">{</span>\n<span class=\"grvsc-line\">  &quot;id&quot; : 123456789,                     Payload</span>\n<span class=\"grvsc-line\">                            ---------------------------------&gt;  eyJpZCI6MTIzNDU2Nzg5LCJuYW1lIjoiSm9zZXBoIn0</span>\n<span class=\"grvsc-line\">  &quot;name&quot; : &quot;Joseph&quot;</span>\n<span class=\"grvsc-line\">}</span>\n<span class=\"grvsc-line\">                                                Signature</span>\n<span class=\"grvsc-line\">OpOSSw7e485LOP5PrzScxHb7SR6sAOMRckfFwi4rp7o  ----------------&gt;  OpOSSw7e485LOP5PrzScxHb7SR6sAOMRckfFwi4rp7o</span></code></pre>\n<p>This shows the decoded JSON Web Token. In the deserialized form, JWT contains only the header and the payload as plain JSON objects.</p>\n<h2 id=\"jws--json-web-signature\" style=\"position:relative;\"><a href=\"#jws--json-web-signature\" aria-label=\"jws  json web signature permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JWS — JSON Web Signature</h2>\n<p>JWS is used to represent content secured with digital signatures or Hash-based Message Authentication Codes (HMACs) with the help of JSON data structures. It cryptographically secures a JWS Header and JWS Payload with a JWS Signature. The encoded strings of these three are concatenated using dots similar to JWT. The identifiers and algorithms used are specified in the JSON Web Algorithms specification.</p>\n<p>The JWS Header MUST contain an alg parameter, as it uses the algorithm to encode the JWS Header and the JWS Payload to produce the JWS Signature. Some of the commonly used algorithms to sign the JWS Header and Payload are:</p>\n<ul>\n<li>HMAC using SHA-256 or SHA-512 hash algorithms (HS256, HS512)</li>\n<li>RSA using SHA-256 or SHA-512 hash algorithms (RS256, RS512)</li>\n</ul>\n<p>JWS example:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 ----------------&gt; JWS Header</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ --------------&gt; JWS Payload</span></code></pre>\n<p>It has an Encoded JWS Header followed by an Encoded JWS Payload separated by a '.'. This is the JWS Signing input which, on signing with the HMAC SHA-256 algorithm and base64url encoding, gives the Encoded JWS Signature value:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk</span></code></pre>\n<p>On concatenation:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk</span></code></pre>\n<p>Learn more about JWS <a href=\"https://openid.net/specs/draft-jones-json-web-signature-04.html\">here</a></p>\n<h2 id=\"jwe--json-web-encryption\" style=\"position:relative;\"><a href=\"#jwe--json-web-encryption\" aria-label=\"jwe  json web encryption permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JWE — JSON Web Encryption</h2>\n<p>JSON Web Encryption enables encrypting a token so that only the intended recipient can read it. It standardizes the way to represent the encoded data in a JSON data structure. Representation of the encrypted payload may be by JWE compact serialization or JWE JSON serialization.</p>\n<h3 id=\"structure-1\" style=\"position:relative;\"><a href=\"#structure-1\" aria-label=\"structure 1 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Structure</h3>\n<p>The JWE compact serialization form has five main components:</p>\n<ol>\n<li>JOSE header</li>\n<li>JWE Encrypted Key</li>\n<li>JWE initialization vector</li>\n<li>JWE Ciphertext</li>\n<li>JWE Authentication Tag</li>\n</ol>\n<p>All these components are base64url-encoded and are concatenated using dots (<code>.</code>).</p>\n<ul>\n<li>\n<p>The JOSE Header, the first element of the token, is the same as the headers of the previously mentioned JWT and JWS.</p>\n<p>JWE has additional elements to the Header — <code>enc</code> and <code>zip</code>.</p>\n<p><code>enc</code> defines the <em>content encryption algorithm</em> while the <code>alg</code> element defines the encryption algorithm for the <em>Content Encryption Key (CEK)</em>.</p>\n<p><code>zip</code> provides a compression algorithm if token compression is needed.</p>\n</li>\n<li>During the encryption process, the issuer generates a random key, which is 256-bits in size, that is used to encrypt the message. This is placed in the JWE Encrypted key section.</li>\n<li>Some encryption algorithms require an initialization vector, which is a randomly generated number that is used along with a secret key to encrypt data. This prevents repeated encryption of the same data using the same secret key. The recipient requires this initialization vector to decrypt the message, and hence, is placed in the JWE token.</li>\n<li>The fourth section of the token is the JWE ciphertext that is computed by encrypting the plaintext JSON payload. It uses the algorithm mentioned in the header's <code>enc</code> element.</li>\n<li>The JWE Authentication Tag is the last part of the JWE Token generated along with the ciphertext. It ensures the integrity of the ciphertext.</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"> &quot;header&quot;:</span>\n<span class=\"grvsc-line\">{</span>\n<span class=\"grvsc-line\">    &quot;alg&quot; : &quot;RSA-OAEP&quot;,                --------------------&gt; For content encryption key</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">    &quot;enc&quot; : &quot;A256GCM&quot;                  --------------------&gt; For content encryption algorithm</span>\n<span class=\"grvsc-line\">},</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"> &quot;encrypted_key&quot; : &quot;qtF60gW8O8cXKiYyDsBPX8OL0GQfhOxwGWUmYtHOds7FJWTNoSFnv5E6A_Bgn_2W&quot;</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">&quot;iv&quot; : &quot;HRhA5nn8HLsvYf8F-BzQew&quot;,       --------------------&gt; initialization vector</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">&quot;ciphertext&quot; : &quot;ai5j5Kk43skqPLwR0Cu1ZIyWOTUpLFKCN5cuZzxHdp0eXQjYLGpj8jYvU8yTu9rwZQeN9EY0_81hQHXEzMQgfCsRm0HXjcEwXInywYcVLUls8Yik&quot;,</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">&quot;tag&quot; : &quot;thh69dp0Pz73kycQ&quot;             --------------------&gt; Authentication tag</span>\n<span class=\"grvsc-line\">}</span></code></pre>\n<p>Learn more about JWE <a href=\"https://datatracker.ietf.org/doc/html/draft-jones-json-web-encryption\">here</a></p>\n<h2 id=\"jwk--json-web-key\" style=\"position:relative;\"><a href=\"#jwk--json-web-key\" aria-label=\"jwk  json web key permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JWK — JSON Web Key</h2>\n<p>JWK is a JSON structure representing a set of public keys as a JSON object using the Elliptic Curve or RSA algorithms. Public key representations can help verify the signature with the corresponding private key.</p>\n<h3 id=\"structure-2\" style=\"position:relative;\"><a href=\"#structure-2\" aria-label=\"structure 2 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Structure</h3>\n<p>JWK consists of a JWK Container Object and an array of JWK Key Objects.</p>\n<ul>\n<li>The JWK Container Object is a JSON object that contains a specific member that is an array. This member is a required element in the Container Object.</li>\n<li>The JWK Key Objects are stored within the array of the JWK Container object. They have a set of members that is common to all key types. As mentioned before, JWK Key objects can use Elliptic Curve or RSA algorithms. To do so, the <code>alg</code> field must hold <code>EC</code> or <code>RSA</code>, respectively. Here is an example of a JWK using RSA:</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">{</span>\n<span class=\"grvsc-line\">&quot;alg&quot;:&quot;RSA&quot;,</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">&quot;mod&quot;: &quot;0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs</span>\n<span class=\"grvsc-line\">tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI</span>\n<span class=\"grvsc-line\">SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw&quot;,</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">&quot;exp&quot;:&quot;AQAB&quot;,</span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\">&quot;kid&quot;:&quot;2011-04-29&quot;</span>\n<span class=\"grvsc-line\">}</span></code></pre>\n<p>It provides a Key ID for matching.</p>\n<h2 id=\"jwa--json-web-algorithms\" style=\"position:relative;\"><a href=\"#jwa--json-web-algorithms\" aria-label=\"jwa  json web algorithms permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JWA — JSON Web Algorithms</h2>\n<p>The JWA specification focuses mainly on enumerating the algorithms necessary for JWS, JWK AND JWE. It also describes the operations that are specific to these algorithms and key types.</p>\n<p><strong>Algorithms for JWS:</strong> These algorithms are used to sign the contents of the JWS Header and the JWS Payload</p>\n<figure>\n  <img src=\"/fc6a7de2f489ae211efdce5772825f45/JWS_algo.webp\" alt=\"JWS algorithms\" align=\"center\">\n  <figcaption align=\"center\">Source: <a href=\"https://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-10.html\">ietf-jose-json-web-algorithms</a></figcaption>\n</figure>\n<p><strong>Algorithms for JWE</strong> These algorithms encrypt the Content Encryption Key (CEK) and produce the JWE Encrypted Key</p>\n<figure>\n  <img src=\"/fe11d3345c9923bed40f6eb944d6b0f1/JWE_algo.webp\" alt=\"JWE algorithms\" align=\"center\">\n  <figcaption align=\"center\">Source: <a href=\"https://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-10.html\">ietf-jose-json-web-algorithms</a> </figcaption>\n</figure>\n<p><strong>Algorithms for JWK:</strong> JWA specifies a set of algorithm families to be used for the public keys represented by JWK</p>\n<figure>\n  <img src=\"/c6bc6931be2e66587f6f3dfcd7806e10/JWK_algo.webp\" align=\"center\">\n  <figcaption align=\"center\">Source: <a href=\"https://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-10.html\">ietf-jose-json-web-algorithms</a> </figcaption>\n</figure>\n<p>Learn more about JWA <a href=\"https://datatracker.ietf.org/doc/html/draft-ietf-jose-json-web-algorithms-40\">here</a>.</p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>The IETF JSON Object Signing and Encryption (JOSE) working group was chartered to develop a secure object format based on JSON and simplify adding object-based security features to internet applications.</p>\n<p>The basic requirements for these object formats are confidentiality and integrity mechanisms encoded in JSON. JWT, JWS, JWE, JWK, and JWA are the JOSE working group items intended to describe these object formats.</p>\n<p>The JOSE specifications have many use cases and are sought out for integrity protection, encryption, security tokens, OAuth, web cryptography, etc. Check out <a href=\"https://datatracker.ietf.org/doc/rfc7165/\">this site</a> to know more about JOSE use cases.</p>\n<p>Want to learn how to use JWT for authentication in your apps? Check out this informational <a href=\"https://www.loginradius.com/blog/engineering/guest-post/jwt-authentication-best-practices-and-when-to-use/\">JWT authentication guide</a>.</p>\n<p><strong>References:</strong></p>\n<ul>\n<li><a href=\"https://tools.ietf.org/\">IETF</a></li>\n<li><a href=\"https://openid.net/\">OpenID</a></li>\n</ul>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n</style>","frontmatter":{"date":"November 24, 2021","updated_date":null,"title":"What are JWT, JWS, JWE, JWK, and JWA?","tags":["JSON","Encryption"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/7898fa94ca50b14a5edee22b6dd76018/58556/coverImage.webp","srcSet":"/static/7898fa94ca50b14a5edee22b6dd76018/61e93/coverImage.webp 200w,\n/static/7898fa94ca50b14a5edee22b6dd76018/1f5c5/coverImage.webp 400w,\n/static/7898fa94ca50b14a5edee22b6dd76018/58556/coverImage.webp 800w,\n/static/7898fa94ca50b14a5edee22b6dd76018/99238/coverImage.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Yashesvinee V","github":"Yashesvinee","avatar":null}}}}]}},"pageContext":{"tag":"JSON"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}