Skip to content

Commit 01f3a20

Browse files
fetsornisomorphic-git-bot
authored andcommitted
fix: fix header name in docs/onAuth.md (#2225)
The doc string promises to reimplement default behaviour, and default header is called "Authorization", not "Authentication". User should expect this snippet to work exactly like the default onAuth. The next doc string about "X-Authentication" is fine since it's clearly an example of a custom header. docs: add @fetsorn as a contributor
1 parent 38d36a9 commit 01f3a20

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/en/next/onAuth.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ <h2><a class="anchor" aria-hidden="true" id="option-2-headers"></a><a href="#opt
134134
<p>To re-implement the default Basic Auth behavior, do something like this:</p>
135135
<pre><code class="hljs css language-js"><span class="hljs-keyword">let</span> auth = {
136136
<span class="hljs-attr">headers</span>: {
137-
<span class="hljs-attr">Authentication</span>: <span class="hljs-string">`Basic <span class="hljs-subst">${Buffer.<span class="hljs-keyword">from</span>(<span class="hljs-string">`<span class="hljs-subst">${username}</span>:<span class="hljs-subst">${password}</span>`</span>).toString(<span class="hljs-string">'base64'</span>)}</span>`</span>
137+
<span class="hljs-attr">Authorization</span>: <span class="hljs-string">`Basic <span class="hljs-subst">${Buffer.<span class="hljs-keyword">from</span>(<span class="hljs-string">`<span class="hljs-subst">${username}</span>:<span class="hljs-subst">${password}</span>`</span>).toString(<span class="hljs-string">'base64'</span>)}</span>`</span>
138138
}
139139
}
140140
</code></pre>

docs/en/next/onAuth/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ <h2><a class="anchor" aria-hidden="true" id="option-2-headers"></a><a href="#opt
134134
<p>To re-implement the default Basic Auth behavior, do something like this:</p>
135135
<pre><code class="hljs css language-js"><span class="hljs-keyword">let</span> auth = {
136136
<span class="hljs-attr">headers</span>: {
137-
<span class="hljs-attr">Authentication</span>: <span class="hljs-string">`Basic <span class="hljs-subst">${Buffer.<span class="hljs-keyword">from</span>(<span class="hljs-string">`<span class="hljs-subst">${username}</span>:<span class="hljs-subst">${password}</span>`</span>).toString(<span class="hljs-string">'base64'</span>)}</span>`</span>
137+
<span class="hljs-attr">Authorization</span>: <span class="hljs-string">`Basic <span class="hljs-subst">${Buffer.<span class="hljs-keyword">from</span>(<span class="hljs-string">`<span class="hljs-subst">${username}</span>:<span class="hljs-subst">${password}</span>`</span>).toString(<span class="hljs-string">'base64'</span>)}</span>`</span>
138138
}
139139
}
140140
</code></pre>

js/isomorphic-git/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
396396
<tr>
397397
<td align="center"><a href="https://github.com/hemanthkini"><img src="https://avatars.githubusercontent.com/u/3934055?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Hemanth Kini</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=hemanthkini" title="Code">💻</a></td>
398398
<td align="center"><a href="https://github.com/anish3333"><img src="https://avatars.githubusercontent.com/u/128889867?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Anish Awasthi</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=anish3333" title="Code">💻</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=anish3333" title="Documentation">📖</a> <a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=anish3333" title="Tests">⚠️</a></td>
399+
<td align="center"><a href="https://github.com/fetsorn"><img src="https://avatars.githubusercontent.com/u/12858105?v=4?s=60" width="60px;" alt=""/><br /><sub><b>fetsorn</b></sub></a><br /><a href="https://github.com/isomorphic-git/isomorphic-git/commits?author=fetsorn" title="Documentation">📖</a></td>
399400
</tr>
400401
</table>
401402

0 commit comments

Comments
 (0)