Skip to content

Commit

Permalink
Format |userVerification| decisions as switches
Browse files Browse the repository at this point in the history
  • Loading branch information
emlun committed Nov 9, 2017
1 parent bae7b05 commit fc2c7b8
Showing 1 changed file with 46 additions and 17 deletions.
63 changes: 46 additions & 17 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -752,16 +752,30 @@ When this method is invoked, the user agent MUST execute the following algorithm
|authenticator| is not capable of performing [=user verification=], [=iteration/continue=].

1. Let |userVerification| be the <dfn>effective user verification requirement for credential creation</dfn>, a Boolean value,
as follows:
- If {{AuthenticatorSelectionCriteria/requireUserVerification}} is set to {{UserVerificationRequirement/required}}, let
|userVerification| be true.
- If {{AuthenticatorSelectionCriteria/requireUserVerification}} is set to {{UserVerificationRequirement/preferred}}, let
|userVerification| be true if the |authenticator| is capable of [=user verification=] and false if the |authenticator|
is not capable of [=user verification=].
- If {{AuthenticatorSelectionCriteria/requireUserVerification}} is set to {{UserVerificationRequirement/discouraged}}, let
|userVerification| be false.
as follows. If {{AuthenticatorSelectionCriteria/requireUserVerification}}

1. Let |excludeCredentialDescriptorList| be a new [=list=].
<dl class="switch">

: is set to {{UserVerificationRequirement/required}}
:: Let |userVerification| be `true`.

: is set to {{UserVerificationRequirement/preferred}}
:: If the |authenticator|

<dl class="switch">
: is capable of [=user verification=]
:: Let |userVerification| be `true`.

: is not capable of [=user verification=]
:: Let |userVerification| be `false`.
</dl>

: is set to {{UserVerificationRequirement/discouraged}}
:: Let |userVerification| be `false`.

</dl>

l. Let |excludeCredentialDescriptorList| be a new [=list=].

1. [=list/For each=] credential descriptor |C| in <code>|options|.{{MakePublicKeyCredentialOptions/excludeCredentials}}</code>:
1. If <code>|C|.{{transports}}</code> [=list/is not empty=], and |authenticator| is connected over a transport not
Expand Down Expand Up @@ -977,14 +991,29 @@ method is invoked, the user agent MUST:
[=iteration/continue=].

1. Let |userVerification| be the <dfn>effective user verification requirement for assertion</dfn>, a Boolean value, as
follows:
- If |options|.{{AuthenticatorSelectionCriteria/requireUserVerification}} is set to
{{UserVerificationRequirement/required}}, let |userVerification| be true.
- If |options|.{{AuthenticatorSelectionCriteria/requireUserVerification}} is set to
{{UserVerificationRequirement/preferred}}, let |userVerification| be true if the |authenticator| is capable of [=user
verification=] and false if the |authenticator| is not capable of [=user verification=].
- If |options|.{{AuthenticatorSelectionCriteria/requireUserVerification}} is set to
{{UserVerificationRequirement/discouraged}}, let |userVerification| be false.
follows. If <code>|options|.{{AuthenticatorSelectionCriteria/requireUserVerification}}</code>

<dl class="switch">

: is set to {{UserVerificationRequirement/required}}
:: Let |userVerification| be `true`.

: is set to {{UserVerificationRequirement/preferred}}
:: If the |authenticator|

<dl class="switch">
: is capable of [=user verification=]
:: Let |userVerification| be `true`.

: is not capable of [=user verification=]
:: Let |userVerification| be `false`.
</dl>

: is set to {{UserVerificationRequirement/discouraged}}
:: Let |userVerification| be `false`.

</dl>


1. Let |allowCredentialDescriptorList| be a new [=list=].

Expand Down

0 comments on commit fc2c7b8

Please sign in to comment.