-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify the fields API #668
Open
cbiesinger
wants to merge
3
commits into
w3c-fedid:main
Choose a base branch
from
cbiesinger:fields
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -895,8 +895,13 @@ the exception thrown. | |||||
|accountsList|. | ||||||
1. If |account| is failure, return (failure, true). | ||||||
1. If [=compute the connection status=] of |account|, |provider| and |globalObject| is | ||||||
[=compute the connection status/connected=], or if |provider|. | ||||||
{{IdentityProviderRequestOptions/fields}} is [=list/empty=], set |permission| to true. | ||||||
[=compute the connection status/connected=], set |permission| to true. | ||||||
1. Otherwise, if |provider|.{{IdentityProviderRequestOptions/fields}} is [=list/empty=], | ||||||
[=create a connection between the RP and the IdP account=] with |provider|, |account|, | ||||||
and |globalObject| and set |permission| to |true|. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Note: The connection would normally be created in the [=request permission to sign-up=] | ||||||
algorithm, but we do not want to show an extra dialog in this case. | ||||||
1. Otherwise: | ||||||
1. Let |permission| be the result of running the [=request permission to sign-up=] | ||||||
algorithm with |account|, |config|, |provider|, and |globalObject|. | ||||||
|
@@ -1212,15 +1217,20 @@ To <dfn>fetch an identity assertion</dfn> given a {{USVString}} | |||||
1. ("account_id", |accountId|) | ||||||
1. ("is_auto_selected", |isAutoSelected|) | ||||||
1. If |fields| is not empty: | ||||||
1. Let |serializedFields| be the entries of |fields| concatenated with a "," | ||||||
1. Let |fieldsString| be the entries of |fields| concatenated with a comma ("`,`") | ||||||
between elements. | ||||||
1. Append ("fields", |serializedFields|) to |list|. | ||||||
1. Append ("fields", |fieldsString|) to |list|. | ||||||
1. If |disclosureShownFor| is not empty: | ||||||
1. Let |serializedDisclosure| be the entries of |disclosureShownFor| concatenated | ||||||
with a "," between elements. | ||||||
1. Append ("disclosure_shown_for", |serializedDisclosure|) to |list|. | ||||||
1. If |disclosureShownFor| contains all of "name", "email" and "picture", append | ||||||
1. Let |disclosureString| be the entries of |disclosureShownFor| concatenated | ||||||
with a comma ("`,`") between elements. | ||||||
1. Append ("disclosure_shown_for", |disclosureString|) to |list|. | ||||||
1. If |disclosureShownFor| contains all of "name", "email", and "picture", append | ||||||
npm1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
("disclosure_text_shown", true) to |list|. | ||||||
|
||||||
Note: This parameter exists for backwards compatibility with older identity providers | ||||||
that do not yet support `disclosure_shown_for`. At the time, the disclosure text, | ||||||
if shown, always included name, email and picture. Newer identity providers should | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
check `disclosure_shown_for` instead. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
1. If |provider|'s {{IdentityProviderRequestOptions/params}} is not empty: | ||||||
1. Let |json| be the result of [=serializing a JavaScript value to a JSON string=] | ||||||
with |provider|'s {{IdentityProviderRequestOptions/params}}. | ||||||
|
@@ -1301,25 +1311,26 @@ To <dfn>request permission to sign-up</dfn> the user with a given an {{IdentityP | |||||
an {{IdentityProviderAPIConfig}} |config|, an {{IdentityProviderRequestOptions}} |provider|, and a | ||||||
|globalObject|, run the following steps. This returns a boolean. | ||||||
1. Assert: These steps are running [=in parallel=]. | ||||||
1. Let |metadata| be the result of running [=fetch the client metadata=] with |config|, | ||||||
|provider|, and |globalObject|. | ||||||
1. Let |fields| be |provider|.{{IdentityProviderRequestOptions/fields}} or, if not specified, | ||||||
1. Let |fields| be |provider|.{{IdentityProviderRequestOptions/fields}} or, if not present, | ||||||
`["name", "email", "picture"]`. | ||||||
|
||||||
Note: Unspecified is different from an explicitly specified empty list. | ||||||
Note: Omitted is different from an explicitly present empty list. | ||||||
1. Let |metadata| be null. | ||||||
1. If |fields| is not [=list/empty=], set |metadata| to the result of running [=fetch the client | ||||||
metadata=] with |config|, |provider|, and |globalObject|. | ||||||
1. Prompt the user to gather explicit intent to create an account. The user agent MAY use the | ||||||
{{IdentityProviderBranding}} to inform the style choices of its UI. Additionally: | ||||||
1. If |provider|.{{IdentityProviderRequestOptions/fields}} is not [=list/empty=]: | ||||||
1. If |fields| is not [=list/empty=]: | ||||||
1. If |metadata| is not failure, |metadata|["{{IdentityProviderClientMetadata/privacy_policy_url}}"] | ||||||
cbiesinger marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
is defined and the |provider|'s {{IdentityProviderConfig/clientId}} is not in the list of | ||||||
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/privacy_policy_url}}"] link. | ||||||
1. If |metadata| is not failure, |metadata|["{{IdentityProviderClientMetadata/terms_of_service_url}}"] | ||||||
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 MUST prompt the user for permission to share the data in |fields|, | ||||||
interpreting the strings as follows (this is the <dfn>list of recognized fields</dfn>): | ||||||
interpreting the strings in the <dfn>list of recognized fields</dfn> as follows: | ||||||
: `"name"` | ||||||
:: The user's name as given in {{IdentityProviderAccount}}.{{IdentityProviderAccount/name}}. | ||||||
: `"email"` | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.