Skip to content

Commit

Permalink
changing name of method
Browse files Browse the repository at this point in the history
changing name of method to isUserVerifyingPlatformAuthenticatorAvailable
  • Loading branch information
balfanz committed Nov 9, 2017
1 parent 474d025 commit 25a35a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.bs
Expand Up @@ -1185,9 +1185,9 @@ When this method is invoked, the user agent MUST execute the following algorithm

1. Return a {{DOMException}} whose name is "{{NotSupportedError}}", and terminate this algorithm

### Platform Authenticator Availability - PublicKeyCredential's `isPlatformAuthenticatorAvailable()` method ### {#isPlatformAuthenticatorAvailable}
### Availability of User-Verifying Platform Authenticator - PublicKeyCredential's `isUserVerifyingPlatformAuthenticatorAvailable()` method ### {#isUserVerifyingPlatformAuthenticatorAvailable}

<div link-for-hint="WebAuthentication/isPlatformAuthenticatorAvailable">
<div link-for-hint="WebAuthentication/isUserVerifyingPlatformAuthenticatorAvailable">

[=[RPS]=] use this method to determine whether they can create a new credential using a user verifying [=platform authenticator=].
Upon invocation, the [=client=] employs a platform-specific procedure to discover available user-verifying [=platform authenticators=].
Expand Down Expand Up @@ -1216,7 +1216,7 @@ but short enough that the dangling promise will still be resolved in a reasonabl

<pre class="idl">
partial interface PublicKeyCredential {
static Promise < boolean > isPlatformAuthenticatorAvailable();
static Promise < boolean > isUserVerifyingPlatformAuthenticatorAvailable();
};
</pre>

Expand Down Expand Up @@ -3796,7 +3796,7 @@ The sample code for generating and registering a new key follows:
});
</pre>

## Registration Specifically with Platform Authenticator ## {#sample-registration-with-platform-authenticator}
## Registration Specifically with User Verifying Platform Authenticator ## {#sample-registration-with-platform-authenticator}

This is flow for when the [=[RP]=] is specifically interested in creating a public key credential with
a user verifying [=platform authenticator=].
Expand All @@ -3817,7 +3817,7 @@ a user verifying [=platform authenticator=].
<pre class="example" highlight="js">
if (!PublicKeyCredential) { /* Platform not capable of the API. Handle error. */ }

PublicKeyCredential.isPlatformAuthenticatorAvailable()
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
.then(function (userIntent) {

// If the user has affirmed willingness to register with RP using an available platform authenticator
Expand Down

2 comments on commit 25a35a9

@smaug----
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is quite some name. Longest method on the web platform perhaps?
Wouldn't something like hasUserVerifyingAuthenticator() have worked too?

@jcjones
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not wanting to judge here, because I didn't push for this, but the argument was that the two criteria for this method to work w/o being privacy-compromising was:

  1. That it only be true for built-in authenticators ("Platform"), not ones that could come-and-go as they're unplugged or leave radio range, and
  2. That it only be true for authenticators that provide a strong tie to a particular user, such as via a PIN or biometric ("User Verifying").

This is so that sites can use this method to decide if it's super-easy to help users enroll, or if they might need a more complex and guiding UX.

(@balfanz, @equalsJeffH, please fill in where I got this wrong. I don't see this discussion in the IRC logs, so I'm working from my notes.)

Please sign in to comment.