Skip to content

Commit

Permalink
begin align markup approach of the makeCred and getAssn sections
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffH authored and JeffH committed May 18, 2017
1 parent 7f020f6 commit 0e4b64e
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ To support obtaining assertions via {{CredentialsContainer/get()|navigator.crede

### Create a new credential - PublicKeyCredential's `[[Create]](options)` method ### {#createCredential}

<div link-for-hint="PublicKeyCredential/[[Create]](options)">
{{PublicKeyCredential}}'s [=interface object=]'s implementation of the
<dfn for="PublicKeyCredential" method>\[[Create]](options)</dfn> method allows scripts to call
{{CredentialsContainer/create()|navigator.credentials.create()}} to request the creation of a new [=credential key pair=]
Expand All @@ -501,7 +502,8 @@ This method accepts a single argument:
<dl dfn-type="argument" dfn-for="PublicKeyCredential/[[Create]](options)">
: <dfn>options</dfn>
:: This argument is a {{CredentialCreationOptions}} object whose |options|["{{CredentialCreationOptions/publicKey}}"]
member contains a {{MakeCredentialOptions}} object specifying how the credential is to be made.
member contains a {{MakeCredentialOptions}} object specifying the desired attributes of the to-be-created [=public key
credential=].
</dl>

When this method is invoked, the user agent MUST execute the following algorithm:
Expand Down Expand Up @@ -692,20 +694,23 @@ credentials are acceptable to it. The user agent and/or platform locates credent
the user to pick one that the script will be allowed to use. The user may choose not to provide a credential even if one is
present, for example to maintain privacy.

Note: This algorithm is synchronous; the {{Promise}} resolution/rejection is taken care of by
Note: This algorithm is synchronous; the {{Promise}} resolution/rejection is handled by
{{CredentialsContainer/get()|navigator.credentials.get()}}.

<div class="note">
This method takes the following parameters:
This method accepts a single argument:

: |options|
:: A {{CredentialRequestOptions}} object, containing a challenge that the selected authenticator is expected to
sign to produce the assertion, and additional options as described in [[#assertion-options]]
</div>
<dl dfn-type="argument" dfn-for="PublicKeyCredential/[[DiscoverFromExternalSource]](options)">
: <dfn>options<dfn>
:: This argument is a {{CredentialRequestOptions}} object whose |options|["{{CredentialRequestOptions/publicKey}}"] member
contains a challenge that the selected authenticator is expected
to sign to produce the assertion, and additional options as described in [[#assertion-options]].
</dl>
When this method is invoked, the user agent MUST execute the following algorithm:
1. Let |publicKeyOptions| be the value of |options| {{CredentialRequestOptions/publicKey}} member.
1. Assert: |options|["{{CredentialRequestOptions/publicKey}}"] is [=present=].
1. Let |publicKeyOptions| be the value of |options|["{{CredentialRequestOptions/publicKey}}"].
1. If the {{PublicKeyCredentialRequestOptions/timeout}} member of |publicKeyOptions| is [=present=], check if its value lies
within a reasonable range as defined by the platform and if not, correct it to the closest value lying within that range.
Expand Down

0 comments on commit 0e4b64e

Please sign in to comment.