title: In Nuxt.js how do you restrict some routes only to clients with a valid JWT token?
body: <p>In <a href="https://nuxtjs.org" rel="nofollow noreferrer">Nuxt.js</a> this is one way to implement authentication :</p>
  <ol>
  <li>The client authenticates by sending an HTTP request with its credentials in the body to an API route of the Nuxt backend ;</li>
  <li>The Nuxt backend responds with a <a href="https://jwt.io/introduction" rel="nofollow noreferrer">JWT token</a> that allows the client to access protected routes ;</li>
  <li>Finally, when the authenticated user tries to access such a route, they make an HTTP request to the Nuxt backend with their JWT token inserted in the header ;</li>
  <li><strong>The backend validates the JWT token</strong> and responds with the requested page JSON data to the client.</li>
  </ol>
  <p>What I don't understand is how to make the Nuxt backend aware that for some protected routes it has to check the JWT token of the client before providing the page JSON data. I mean, <strong>where <em>exactly</em> in Nuxt can I implement this kind of validation ?</strong></p>