Skip to content

Commit

Permalink
Lint index.bs
Browse files Browse the repository at this point in the history
  • Loading branch information
tttzach authored Oct 3, 2024
1 parent d34ecd0 commit ce8f11e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,11 @@ This specification introduces an extension to the {{CredentialRequestOptions}} o
The {{IdentityCredentialRequestOptions}} contains a list of
{{IdentityProviderConfig}}s that the [=RP=] supports and has
pre-registered with (i.e. the [=IDP=] has given the [=RP=] a `clientId`).
The {{IdentityCredentialRequestOptions}} also contains an {{IdentityCredentialRequestOptionsContext}},
which the user agent can use to provide a more meaningful dialog to users, and an {{IdentityCredentialRequestOptionsMode}},
which the user agent can use to specify different behaviors or dialog types.
The {{IdentityCredentialRequestOptions}} also contains an
{{IdentityCredentialRequestOptionsContext}}, which the user agent can use to
provide a more meaningful dialog to users, and an
{{IdentityCredentialRequestOptionsMode}}, which the user agent can use to
specify different behaviors or dialog types.

<xmp class=idl>
enum IdentityCredentialRequestOptionsContext {
Expand Down Expand Up @@ -784,18 +786,24 @@ the exception thrown.
1. Let |mode| be |options|'s {{IdentityCredentialRequestOptions/mode}}.
1. If |mode| is [=active=]
1. If [=transient activation=] is not present, return (failure, true).
1. If [=transient activation=] is present and if there is a pending request where |mode| is [=passive=], return (failure, true) for the pending request.
1. If [=transient activation=] is present and if there is a pending
request where |mode| is [=passive=], return (failure, true) for the
pending request.
1. Let |loginStatus| be the result of [=get the login status=] with
the [=/origin=] of |provider|'s {{IdentityProviderConfig/configURL}}.
1. If |loginStatus| is [=unknown=], a user agent MAY set it to [=logged-out=].
1. If |loginStatus| is [=logged-out=], the user agent SHOULD set |loginStatus| to [=unknown=] and MUST do one of the following:
1. If |loginStatus| is [=logged-out=], the user agent SHOULD set
|loginStatus| to [=unknown=] and MUST do one of the following:

* Return (failure, false).
* Prompt the user whether to continue. This MAY include an affordance to [=show an IDP login dialog=].
* Prompt the user whether to continue. This MAY include an affordance
to [=show an IDP login dialog=].

* If the user cancels this dialog, return (failure, true).
* If the user triggers this affordance, [=fetch the config file and show an IDP login dialog=].
* If |mode| is [=active=] and [=transient activation=] is present, [=fetch the config file and show an IDP login dialog=].
* If the user triggers this affordance,
[=fetch the config file and show an IDP login dialog=].
* If |mode| is [=active=] and [=transient activation=] is present,
[=fetch the config file and show an IDP login dialog=].

1. Let |requiresUserMediation| be |provider|'s {{IdentityProviderConfig/configURL}}'s [=/origin=]'s
[=requires user mediation=].
Expand Down Expand Up @@ -1293,7 +1301,8 @@ an {{IdentityProviderAPIConfig}} |config|, an {{IdentityProviderRequestOptions}}
is defined, and the |provider|'s {{IdentityProviderConfig/clientId}} is not in the list of
|account|["{{IdentityProviderAccount/approved_clients}}"], then the user agent MUST display
the |metadata|["{{IdentityProviderClientMetadata/terms_of_service_url}}"] link.
1. The user agent MAY use the {{IdentityCredentialRequestOptions/context}} and |options|'s
1. The user agent MAY use the
{{IdentityCredentialRequestOptions/context}} and |options|'s
{{IdentityCredentialRequestOptions/mode}} to customize the dialog shown.
1. If the user does not grant permission, return false.
1. [=Create a connection between the RP and the IdP account=] with |provider|, |account|, and
Expand Down

0 comments on commit ce8f11e

Please sign in to comment.