title: What is the purpose of the JWT header parameter?
body: <p>I am sorry for the stupid question but I am novice in the token usage and maybe don't understand something.</p>
  
  <p>I started to read about JWT and I am confused about it's structure. The documentation says that it has three parts:</p>
  
  <pre><code>header
  payload
  signature
  </code></pre>
  
  <p>I understand that in payload we keep information and in signature part we keep a signature for payload check. But what is the purpose of the header part? It says that typically it consists of two parts: the type of the token, which is JWT, and the hashing algorithm being used, such as HMAC SHA256 or RSA.</p>
  
  <ol>
  <li>If server has signed the token then he knows which method it uses. So, it isn't a helpful information for the server. It will not use this information at all.<br></li>
  <li>Isn't it a hint for hackers? They will know which method your server uses. I am not sure that it is a good practice for increase a security.</li>
  </ol>
  
  <p>I am apologize if this is a stupid question and in reality we really need to keep information about our method of signature for some purposes but I haven't found the information with explanation why do we need this.</p>