title: Manually validate flask-extended-jwt's access token
body: <p>I have a SPA app that contains an form with an upload file field. I have a rest API whose endpoints are protected via flask-extended-jwt JWT. To authenticate the REST endpoints I use @jwt_required. I want to authenticate the upload request as well.</p>
  
  <p>Because of the client side I can't add an Authorization Bearer header so I thought to add the access token as a hidden field when submitting the form.</p>
  
  <p>What is the best way to manually validate the JWT access token after I read it from the form?</p>
  
  <pre><code>class Upload(Resource):
  
  def post(self):
      #TODO: check for access token
      access_token = None
      if 'access_token' in request.form and request.form['access_token']:
          access_token = request.form['access_token']
      else:
          message = json.dumps({'message': 'Invalid or missing token', 'success': False})
          return Response(response=message, status=401, mimetype='text/plain')
  
      if access_token:
          #TODO: validate_token(access_token)
  </code></pre>
  
  <p>Thank you</p>