Skip to content

Commit

Permalink
Add displayName for the user account (#423)
Browse files Browse the repository at this point in the history
* Add detailedName for the user account

* Use displayName rather than detailedName
  • Loading branch information
selfissued authored and equalsJeffH committed Apr 28, 2017
1 parent 5dedfde commit 6d873d5
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@ When this method is invoked, the user agent MUST execute the following algorithm
1. Let |options| be the value of |options|["{{CredentialRequestOptions/scoped}}"].

1. If any of the {{ScopedCredentialEntity/name}} member of |options|.{{MakeCredentialOptions/rp}}, the
{{ScopedCredentialEntity/name}} member of |options|.{{MakeCredentialOptions/user}}, or the {{ScopedCredentialEntity/id}}
{{ScopedCredentialEntity/name}} member of |options|.{{MakeCredentialOptions/user}},
the {{ScopedCredentialUserEntity/displayName}} member of |options|.{{MakeCredentialOptions/user}},
or the {{ScopedCredentialEntity/id}}
member of |options|.{{MakeCredentialOptions/user}} are [=present|not present=], return a {{TypeError}} [=simple exception=].

1. If the {{MakeCredentialOptions/timeout}} member of |options| is [=present=], check if its value lies within a
Expand Down Expand Up @@ -887,13 +889,27 @@ optionally evidence of [=user consent=] to a specific transaction.
will be used, and thus also the type of asymmetric key pair to be generated, e.g., RSA or Elliptic Curve.
</div>

## User Account Parameters for Credential Generation (dictionary <dfn dictionary>ScopedCredentialUserEntity</dfn>) ## {#sctn-user-credential-params}

<pre class="idl">
dictionary ScopedCredentialUserEntity : ScopedCredentialEntity {
DOMString displayName;
};
</pre>

<div dfn-type="dict-member" dfn-for="ScopedCredentialUserEntity">
This dictionary is used to supply additional parameters about the user account when creating a new credential.

The <dfn>displayName</dfn> member contains a friendly name for the user account (e.g., "John P. Smith").
</div>


## Options for Credential Creation (dictionary <dfn dictionary>MakeCredentialOptions</dfn>) ## {#dictionary-makecredentialoptions}

<xmp class="idl">
dictionary MakeCredentialOptions {
required ScopedCredentialEntity rp;
required ScopedCredentialEntity user;
required ScopedCredentialUserEntity user;

required BufferSource challenge;
required sequence<ScopedCredentialParameters> parameters;
Expand All @@ -919,8 +935,10 @@ optionally evidence of [=user consent=] to a specific transaction.
: <dfn>user</dfn>
:: This member contains data about the user account for which the [=relying party=] is requesting attestation.

Its value's {{ScopedCredentialEntity/name}} member is required, and contains a friendly name for the user account (e.g.
"john.p.smith@example.com", or "John P. Smith").
Its value's {{ScopedCredentialEntity/name}} member is required, and contains a name for the user account
(e.g., "john.p.smith@example.com" or "+14255551234").

Its value's {{ScopedCredentialEntity/displayName}} member is required, and contains a friendly name for the user account (e.g., "John P. Smith").

Its value's {{ScopedCredentialEntity/id}} member is required, and contains an identifier for the account, specified by
the [=relying party=]. This is not meant to be displayed to the user, but is used by the relying party to control the
Expand Down Expand Up @@ -3020,7 +3038,8 @@ The sample code for generating and registering a new key follows:
// User:
user: {
id: "1098237235409872"
name: "John P. Smith",
name: "john.p.smith@example.com",
displayName: "John P. Smith",
icon: "https://pics.acme.com/00/p/aBjjjpqPb.png"
},

Expand Down

0 comments on commit 6d873d5

Please sign in to comment.