title: Relogin after N minutes with django and JWT
body: <p><strong>Scenario:</strong> I want a user to re-login when passing to a security sensible area after N minutes, e.g. when user is about to pay an order, however he logged in 1 hour ago, I would like to be sure it's him. This by using <code>rest_framework_jwt</code>.</p>
  
  <p><strong>Long description:</strong></p>
  
  <p>I've been recently testing <code>django</code>  for modern web development (so, backend with rest-api). However, I encountered a problem which I have not yet found a solution. </p>
  
  <p>In <code>rest_framework_jwt</code> you set the authentication class as follows.</p>
  
  <pre><code>'DEFAULT_AUTHENTICATION_CLASSES': (
      'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
  </code></pre>
  
  <p>This will do a great work for the general purpose. However, I want the user to reidentify (re-login) when entering an area with sensible information 10 minutes after login, e.g. sensible information can be a payment area. Thus, I would like to send a parameter to the Authentication class telling that the user is in a sensible area. </p>
  
  <p>What I think as a possible solution but I don't know how to do it yet, is: The <code>rest_framework_jwt</code> creates the variable <code>orig_iat</code> when using the option <code>JWT_ALLOW_REFRESH</code>. I could send a flag to  authentication class to tell that current view is a sensitive area or not, if so and the user logged in more than 10 minutes ago, I can send a message to say that the user needs to re-login to continue.</p>
  
  <p>I don't mind forking the <code>rest_framework_jwt</code> project and adapting it for my purposes, however I would like to know how to send the parameter from the view to the authentication class (in this case: <code>rest_framework_jwt.authentication.JSONWebTokenAuthentication</code>).</p>
  
  <p>Also, If there is already something done with <code>rest_framework_jwt</code> for this scenario, I would like to avoid re-inventing the wheel.</p>