Skip to content

Commit

Permalink
Merge pull request #82 from auth0/release/v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath authored Oct 27, 2022
2 parents f7d2349 + 575c720 commit f5b64d9
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 49 deletions.
20 changes: 10 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3>JSONPrimitive</h3>
<div class="tsd-signature tsd-kind-icon">JSONPrimitive<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/claim-check.ts#L8">packages/access-token-jwt/src/claim-check.ts:8</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/claim-check.ts#L8">packages/access-token-jwt/src/claim-check.ts:8</a></li>
</ul>
</aside>
</section>
Expand All @@ -123,7 +123,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> auth</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/express-oauth2-jwt-bearer/src/index.ts#L62">packages/express-oauth2-jwt-bearer/src/index.ts:62</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/express-oauth2-jwt-bearer/src/index.ts#L62">packages/express-oauth2-jwt-bearer/src/index.ts:62</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -136,10 +136,10 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> auth</h3>
<li>Pass in an <a href="interfaces/authoptions.html#issuerbaseurl">AuthOptions.issuerBaseURL</a> (or define the env
variable <code>ISSUER_BASE_URL</code>)</li>
</ol>
<pre><code class="language-js"><span style="color: #001080">app</span><span style="color: #000000">.</span><span style="color: #795E26">use</span><span style="color: #000000">({</span>
<pre><code class="language-js"><span style="color: #001080">app</span><span style="color: #000000">.</span><span style="color: #795E26">use</span><span style="color: #000000">(</span><span style="color: #795E26">auth</span><span style="color: #000000">({</span>
<span style="color: #000000"> </span><span style="color: #001080">issuerBaseURL:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;http://issuer.example.com&#039;</span><span style="color: #000000">,</span>
<span style="color: #000000"> </span><span style="color: #001080">audience:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;https://myapi.com&#039;</span>
<span style="color: #000000">});</span>
<span style="color: #000000">}));</span>
</code></pre>
<p>This uses the <a href="interfaces/authoptions.html#issuerbaseurl">AuthOptions.issuerBaseURL</a> to find the OAuth 2.0
Authorization Server Metadata to get the <a href="interfaces/authoptions.html#jwksuri">AuthOptions.jwksUri</a>
Expand All @@ -149,11 +149,11 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> auth</h3>
define the env variable <code>JWKS_URI</code>) and <a href="interfaces/authoptions.html#issuer">AuthOptions.issuer</a> (or define
the env variable <code>ISSUER</code>) yourself.</li>
</ol>
<pre><code class="language-js"><span style="color: #001080">app</span><span style="color: #000000">.</span><span style="color: #795E26">use</span><span style="color: #000000">({</span>
<pre><code class="language-js"><span style="color: #001080">app</span><span style="color: #000000">.</span><span style="color: #795E26">use</span><span style="color: #000000">(</span><span style="color: #795E26">auth</span><span style="color: #000000">({</span>
<span style="color: #000000"> </span><span style="color: #001080">jwksUri:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;http://issuer.example.com/well-known/jwks.json&#039;</span><span style="color: #000000">,</span>
<span style="color: #000000"> </span><span style="color: #001080">issuer:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;http://issuer.example.com&#039;</span><span style="color: #000000">,</span>
<span style="color: #000000"> </span><span style="color: #001080">audience:</span><span style="color: #000000"> </span><span style="color: #A31515">&#039;https://myapi.com&#039;</span>
<span style="color: #000000">});</span>
<span style="color: #000000">}));</span>
</code></pre>
<p>You must provide the <code>audience</code> argument (or <code>AUDIENCE</code> environment variable)
used to match against the Access Token&#39;s <code>aud</code> claim.</p>
Expand All @@ -178,7 +178,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> claim<wbr>Check</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/express-oauth2-jwt-bearer/src/index.ts#L106">packages/express-oauth2-jwt-bearer/src/index.ts:106</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/express-oauth2-jwt-bearer/src/index.ts#L106">packages/express-oauth2-jwt-bearer/src/index.ts:106</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -236,7 +236,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> claim<wbr>Equals</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/express-oauth2-jwt-bearer/src/index.ts#L120">packages/express-oauth2-jwt-bearer/src/index.ts:120</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/express-oauth2-jwt-bearer/src/index.ts#L120">packages/express-oauth2-jwt-bearer/src/index.ts:120</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -273,7 +273,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> claim<wbr>Includes</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/express-oauth2-jwt-bearer/src/index.ts#L135">packages/express-oauth2-jwt-bearer/src/index.ts:135</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/express-oauth2-jwt-bearer/src/index.ts#L135">packages/express-oauth2-jwt-bearer/src/index.ts:135</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -311,7 +311,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> required<wbr>Scopes</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/express-oauth2-jwt-bearer/src/index.ts#L150">packages/express-oauth2-jwt-bearer/src/index.ts:150</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/express-oauth2-jwt-bearer/src/index.ts#L150">packages/express-oauth2-jwt-bearer/src/index.ts:150</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
26 changes: 13 additions & 13 deletions docs/interfaces/authoptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> agent</h3>
<div class="tsd-signature tsd-kind-icon">agent<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Agent</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Agent</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L50">packages/access-token-jwt/src/jwt-verifier.ts:50</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L50">packages/access-token-jwt/src/jwt-verifier.ts:50</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -122,7 +122,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> audience</h3>
<div class="tsd-signature tsd-kind-icon">audience<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L29">packages/access-token-jwt/src/jwt-verifier.ts:29</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L29">packages/access-token-jwt/src/jwt-verifier.ts:29</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -138,7 +138,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> clock<wbr>Tolerance</
<div class="tsd-signature tsd-kind-icon">clock<wbr>Tolerance<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L93">packages/access-token-jwt/src/jwt-verifier.ts:93</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L93">packages/access-token-jwt/src/jwt-verifier.ts:93</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -154,7 +154,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> cooldown<wbr>Duration
<div class="tsd-signature tsd-kind-icon">cooldown<wbr>Duration<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L57">packages/access-token-jwt/src/jwt-verifier.ts:57</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L57">packages/access-token-jwt/src/jwt-verifier.ts:57</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -171,7 +171,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> issuer</h3>
<div class="tsd-signature tsd-kind-icon">issuer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L36">packages/access-token-jwt/src/jwt-verifier.ts:36</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L36">packages/access-token-jwt/src/jwt-verifier.ts:36</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -188,7 +188,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> issuer<wbr>BaseURL</h
<div class="tsd-signature tsd-kind-icon">issuer<wbr>BaseURL<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L23">packages/access-token-jwt/src/jwt-verifier.ts:23</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L23">packages/access-token-jwt/src/jwt-verifier.ts:23</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -209,7 +209,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> jwks<wbr>Uri</h3>
<div class="tsd-signature tsd-kind-icon">jwks<wbr>Uri<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L44">packages/access-token-jwt/src/jwt-verifier.ts:44</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L44">packages/access-token-jwt/src/jwt-verifier.ts:44</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -227,7 +227,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> max<wbr>Token<wbr>Age
<div class="tsd-signature tsd-kind-icon">max<wbr>Token<wbr>Age<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L99">packages/access-token-jwt/src/jwt-verifier.ts:99</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L99">packages/access-token-jwt/src/jwt-verifier.ts:99</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -243,7 +243,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> secret</h3>
<div class="tsd-signature tsd-kind-icon">secret<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L113">packages/access-token-jwt/src/jwt-verifier.ts:113</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L113">packages/access-token-jwt/src/jwt-verifier.ts:113</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -259,7 +259,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> strict</h3>
<div class="tsd-signature tsd-kind-icon">strict<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L107">packages/access-token-jwt/src/jwt-verifier.ts:107</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L107">packages/access-token-jwt/src/jwt-verifier.ts:107</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -277,7 +277,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> timeout<wbr>Duration<
<div class="tsd-signature tsd-kind-icon">timeout<wbr>Duration<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L64">packages/access-token-jwt/src/jwt-verifier.ts:64</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L64">packages/access-token-jwt/src/jwt-verifier.ts:64</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -294,7 +294,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> token<wbr>Signing<wbr
<div class="tsd-signature tsd-kind-icon">token<wbr>Signing<wbr>Alg<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L122">packages/access-token-jwt/src/jwt-verifier.ts:122</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L122">packages/access-token-jwt/src/jwt-verifier.ts:122</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -313,7 +313,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> validators</h3>
<div class="tsd-signature tsd-kind-icon">validators<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Validators</span><span class="tsd-signature-symbol">&gt;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L87">packages/access-token-jwt/src/jwt-verifier.ts:87</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L87">packages/access-token-jwt/src/jwt-verifier.ts:87</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
6 changes: 3 additions & 3 deletions docs/interfaces/authresult.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h3>header</h3>
<div class="tsd-signature tsd-kind-icon">header<span class="tsd-signature-symbol">:</span> <a href="jwtheader.html" class="tsd-signature-type" data-tsd-kind="Interface">JWTHeader</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L129">packages/access-token-jwt/src/jwt-verifier.ts:129</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L129">packages/access-token-jwt/src/jwt-verifier.ts:129</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -111,7 +111,7 @@ <h3>payload</h3>
<div class="tsd-signature tsd-kind-icon">payload<span class="tsd-signature-symbol">:</span> <a href="jwtpayload.html" class="tsd-signature-type" data-tsd-kind="Interface">JWTPayload</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L133">packages/access-token-jwt/src/jwt-verifier.ts:133</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L133">packages/access-token-jwt/src/jwt-verifier.ts:133</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -126,7 +126,7 @@ <h3>token</h3>
<div class="tsd-signature tsd-kind-icon">token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/access-token-jwt/src/jwt-verifier.ts#L137">packages/access-token-jwt/src/jwt-verifier.ts:137</a></li>
<li>Defined in <a href="https://github.com/auth0/node-oauth2-jwt-bearer/blob/f7d2349/packages/access-token-jwt/src/jwt-verifier.ts#L137">packages/access-token-jwt/src/jwt-verifier.ts:137</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
Loading

0 comments on commit f5b64d9

Please sign in to comment.