Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Jan 15, 2024
1 parent d26921b commit 7b6e0b9
Show file tree
Hide file tree
Showing 80 changed files with 239 additions and 238 deletions.
12 changes: 6 additions & 6 deletions README.adoc
Expand Up @@ -158,7 +158,7 @@ in the `users` `Map`.
----
const excludeCredentials = user.credentials.map(c => ({
type: 'public-key',
id: c.ID
id: c.id
}));
----

Expand Down Expand Up @@ -238,7 +238,7 @@ object. Note the credential isn't yet associated with a user.
[source,javascript]
----
for (const u of users.values()) {
if (u.credentials.find(c => c.ID === credential.ID)) {
if (u.credentials.find(c => c.id === credential.id)) {
throw new ErrorWithStatus('credential in use', 409);
}
}
Expand Down Expand Up @@ -319,10 +319,10 @@ result of `navigator.credentials.get()`).

[source,javascript]
----
if (credential.Authenticator.CloneWarning) {
if (credential.authenticator.cloneWarning) {
throw new ErrorWithStatus('credential appears to be cloned', 403);
}
const user_cred = user.credentials.find(c => c.ID === credential.ID);
const user_cred = user.credentials.find(c => c.id === credential.id);
if (!user_cred) {
// Should have been checked already in Go by webAuthn.finishLogin
throw new ErrorWithStatus('no credential', 500);
Expand All @@ -337,13 +337,13 @@ Here we do a couple of checks on the credential used for login:

[source,javascript]
----
user_cred.Authenticator.SignCount = credential.Authenticator.SignCount;
user_cred.authenticator.signCount = credential.authenticator.signCount;
reply.code(204);
});
}
----

Finally for login, we have to update the `SignCount` for the credential in the user's credentials
Finally for login, we have to update the `signCount` for the credential in the user's credentials
list. This enables the Go library to check for duplicate requests.

[source,javascript]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -155,7 +155,7 @@ and store this information in the `users` `Map`.
``` javascript
const excludeCredentials = user.credentials.map(c => ({
type: 'public-key',
id: c.ID
id: c.id
}));
```
Expand Down Expand Up @@ -233,7 +233,7 @@ object. Note the credential isn’t yet associated with a user.
``` javascript
for (const u of users.values()) {
if (u.credentials.find(c => c.ID === credential.ID)) {
if (u.credentials.find(c => c.id === credential.id)) {
throw new ErrorWithStatus('credential in use', 409);
}
}
Expand Down Expand Up @@ -311,10 +311,10 @@ received from the browser (i.e. the result of
`navigator.credentials.get()`).
``` javascript
if (credential.Authenticator.CloneWarning) {
if (credential.authenticator.cloneWarning) {
throw new ErrorWithStatus('credential appears to be cloned', 403);
}
const user_cred = user.credentials.find(c => c.ID === credential.ID);
const user_cred = user.credentials.find(c => c.id === credential.id);
if (!user_cred) {
// Should have been checked already in Go by webAuthn.finishLogin
throw new ErrorWithStatus('no credential', 500);
Expand All @@ -331,13 +331,13 @@ Here we do a couple of checks on the credential used for login:
have already been checked in Go.
``` javascript
user_cred.Authenticator.SignCount = credential.Authenticator.SignCount;
user_cred.authenticator.signCount = credential.authenticator.signCount;
reply.code(204);
});
}
```
Finally for login, we have to update the `SignCount` for the credential
Finally for login, we have to update the `signCount` for the credential
in the user’s credentials list. This enables the Go library to check for
duplicate requests.
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/index.html
Expand Up @@ -101,7 +101,7 @@ <h1>All files</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-12-31T23:34:48.547Z
at 2024-01-15T22:17:00.244Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
10 changes: 5 additions & 5 deletions coverage/lcov-report/index.js.html
Expand Up @@ -390,13 +390,13 @@ <h1><a href="index.html">All files</a> index.js</h1>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">715x</span>
<span class="cline-any cline-yes">715x</span>
<span class="cline-any cline-yes">708x</span>
<span class="cline-any cline-yes">708x</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-yes">89x</span>
<span class="cline-any cline-yes">715x</span>
<span class="cline-any cline-yes">715x</span>
<span class="cline-any cline-yes">708x</span>
<span class="cline-any cline-yes">708x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">/*eslint-env node */
Expand Down Expand Up @@ -574,7 +574,7 @@ <h1><a href="index.html">All files</a> index.js</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2023-12-31T23:34:48.547Z
at 2024-01-15T22:17:00.244Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
12 changes: 6 additions & 6 deletions coverage/lcov.info
Expand Up @@ -29,7 +29,7 @@ FNDA:6,checked_exit
FNDA:2,before_exit
FNDA:9,exited
FNDA:5,go.exit
FNDA:715,reviver
FNDA:708,reviver
DA:1,1
DA:2,1
DA:3,1
Expand Down Expand Up @@ -189,13 +189,13 @@ DA:156,1
DA:157,1
DA:158,1
DA:159,1
DA:160,715
DA:161,715
DA:160,708
DA:161,708
DA:162,89
DA:163,89
DA:164,89
DA:165,715
DA:166,715
DA:165,708
DA:166,708
DA:167,1
DA:168,1
LF:168
Expand Down Expand Up @@ -241,7 +241,7 @@ BRDA:142,37,0,4
BRDA:142,38,0,3
BRDA:142,39,0,1
BRDA:145,40,0,4
BRDA:160,41,0,715
BRDA:160,41,0,708
BRDA:161,42,0,89
BRF:43
BRH:43
Expand Down

0 comments on commit 7b6e0b9

Please sign in to comment.