title: Receive and send an authorization token in Swagger
body: <p>I am creating a documentation page with Swagger, and I would like to automatically add the access token received from a correct <code>/login</code> call. I tried using</p>
  
  <pre><code>responseInterceptor: (responseObj) =&gt; {
    if(responseObj.obj.access_token !== 'undefined'){
      token = responseObj.obj.access_token;
    }
    return responseObj
  }
  </code></pre>
  
  <p>to receive and store the token, and</p>
  
  <pre><code>requestInterceptor: (requestObj) =&gt; {
    if(token !== 'undefined') {
      requestObj.headers.Authorization = `Bearer ${token}`;
    }
    return requestObj
  }
  </code></pre>
  
  <p>to pass it onto subsequent requests through the header, however this only works for one call, after which the token reverts back to <code>null</code>.</p>
  
  <p>How could I keep the <code>token</code> value from being reverted?</p>