Skip to content

Commit

Permalink
CREDENTIAL: Formalize the values of Credential type names.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewest committed May 28, 2015
1 parent 9fa06db commit 8a8938c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions specs/credentialmanagement/index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ <h4 id="examples-password-signin">Password-based Sign-in</h4>
<div class="example">
<pre>
navigator.<a attribute>credentials</a>.<a idl lt="get()">get</a>({
"<a idl>types</a>": [ "password" ]
"<a idl>types</a>": [ "<a const>password</a>" ]
}).then(
function(credential) {
if (!credential) {
Expand All @@ -250,7 +250,7 @@ <h4 id="examples-password-signin">Password-based Sign-in</h4>
// really be progressive enhancement on top of an existing form).
return;
}
if (credential.type == "password") {
if (credential.type == "<a const>password</a>") {
credential.<a method lt="send()">send</a>("https://example.com/loginEndpoint")
.then(function (response) {
// Notify the user that signin succeeded! Do amazing, signed-in things!
Expand All @@ -271,7 +271,7 @@ <h4 id="examples-federated-signin">Federated Sign-in</h4>
<div class="example">
<pre>
navigator.<a attribute>credentials</a>.<a idl lt="get()">get</a>({
"<a idl>types</a>": [ "federated" ],
"<a idl>types</a>": [ "<a const>federated</a>" ],
"<a idl>options</a>": {
"<a idl>providers</a>": [ "https://federation.com" ]
}
Expand All @@ -280,7 +280,7 @@ <h4 id="examples-federated-signin">Federated Sign-in</h4>
if (!credential)
return;

if (credential.type == "federated") {
if (credential.type == "<a const>federated</a>") {
switch (credential.<a idl for="FederatedCredential">provider</a>) {
case "https://www.facebook.com/":
// Use Facebook's SDK, a la https://developers.facebook.com/docs/facebook-login/login-flow-for-web/#logindialog
Expand Down Expand Up @@ -601,7 +601,7 @@ <h4 id="interfaces-credential-types-passwordcredential"><code>PasswordCredential
<dt>{{[[type]]}}</dt>
<dd>
All {{PasswordCredential}} objects have their {{[[type]]}} slot's
value set to <code>password</code>.
value set to the string "<dfn const><code>password</code></dfn>".
</dd>
</dl>

Expand Down Expand Up @@ -646,7 +646,7 @@ <h4 id="interfaces-credential-types-federatedcredential"><code>FederatedCredenti
<dt>{{[[type]]}}</dt>
<dd>
All {{FederatedCredential}} objects have their {{[[type]]}}
slot's value set to <code>federated</code>.
slot's value set to the string "<dfn const><code>federated</code></dfn>".
</dd>
</dl>

Expand Down Expand Up @@ -1102,7 +1102,7 @@ <h4 id="gather-locallystoredcredentials">
</li>
<li>
Remove any items from <var>credentials</var> whose {{Credential/type}}
property is not a case-sensitive match for a value in <var>types</var>.
property is not a case-sensitive match for a const in <var>types</var>.
</li>
<li>
Remove any items from <var>credentials</var> whose <a>options matching
Expand Down

0 comments on commit 8a8938c

Please sign in to comment.