<div dir="ltr">Hello,<div><br></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b">I have a request that sends two different tokens (JWT) generated with the same key (JWK).</span><span class="gmail-JLqJ4b"> </span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><br></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b"></span><span class="gmail-JLqJ4b gmail-ChMk0b">Could nginx validate both tokens?</span> <span class="gmail-JLqJ4b gmail-ChMk0b">Each of them is passed in a different Header.</span> <span class="gmail-JLqJ4b gmail-ChMk0b">I tried to duplicate the auth_jwt configuration but it is not possible to duplicate this parameterization in the same location.</span></span><br></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><br></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b">It works:</span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><div style="background-color:rgb(255,255,254);font-family:SFMono-Medium,"SF Mono","Segoe UI Mono","Roboto Mono","Ubuntu Mono",Menlo,monospace;font-size:13px;line-height:18px;white-space:pre"><div style=""><font color="#000000">    </font><span style="color:rgb(32,32,32)">location</span><font color="#000000"> /</font><font color="#202020">myapp</font><font color="#000000"> {</font></div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">proxy_pass</span> <span style="color:rgb(32,32,32)">http</span>:<span style="color:rgb(160,160,160);font-style:italic">//xxxx;</span></div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">auth_jwt</span> <span style="color:rgb(191,38,0)">"Client Token"</span> <span style="color:rgb(32,32,32)">token</span>=<span style="color:rgb(32,32,32)">$http_authclient</span>;</div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">auth_jwt_key_file</span> <span style="color:rgb(32,32,32)">conf</span>.<span style="color:rgb(32,32,32)">d</span>/<span style="color:rgb(32,32,32)">key</span>.<span style="color:rgb(32,32,32)">jwt</span>;</div><div style="color:rgb(0,0,0)">    }</div></div></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><br></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b">It doesn't work:</span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><div style="background-color:rgb(255,255,254);font-family:SFMono-Medium,"SF Mono","Segoe UI Mono","Roboto Mono","Ubuntu Mono",Menlo,monospace;font-size:13px;line-height:18px;white-space:pre"><div><font color="#000000">    </font><span style="color:rgb(32,32,32)">location</span><font color="#000000"> /</font><font color="#202020">myapp</font><font color="#000000"> {</font></div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">proxy_pass</span> <span style="color:rgb(32,32,32)">http</span>:<span style="color:rgb(160,160,160);font-style:italic">//xxxx;</span></div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">auth_jwt</span> <span style="color:rgb(191,38,0)">"Client Token"</span> <span style="color:rgb(32,32,32)">token</span>=<span style="color:rgb(32,32,32)">$http_authclient</span>;</div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">auth_jwt</span> <span style="color:rgb(191,38,0)">"User Token"</span> <span style="color:rgb(32,32,32)">token</span>=<span style="color:rgb(32,32,32)">$http_authuser</span>;<br></div><div style="color:rgb(0,0,0)">        <span style="color:rgb(32,32,32)">auth_jwt_key_file</span> <span style="color:rgb(32,32,32)">conf</span>.<span style="color:rgb(32,32,32)">d</span>/<span style="color:rgb(32,32,32)">key</span>.<span style="color:rgb(32,32,32)">jwt</span>;</div><div style="color:rgb(0,0,0)">    }</div></div></span></span></div></span></span></div><div><br></div><div>Request Example passing two Tokens:</div><div>curl -H "Authclient: XXXXXXX" -H "Authuser: YYYYYYYY" <a href="http://localhost:8080/myapp">http://localhost:8080/myapp</a><br></div><div><br></div><div>Regards</div></div>