@@ -947,11 +947,12 @@ or failure.
947
947
1. Set |rootUrl|'s [=url/scheme=] to |configUrl|' s [=url/scheme=] .
948
948
1. Set |rootUrl|'s [=url/host=] to |configUrl|' s [=url/host=] 's [=host/registrable domain=] .
949
949
1. Set |rootUrl|'s [=url/path=] to the <a>list</a> «".well-known", "web-identity"».
950
- 1. Let |config|, |configInWellKnown| both be null.
950
+ 1. Let |config|, |wellKnown|, |accounts_url|, and |login_url| be null.
951
+ 1. Let |skipWellKnown| be false.
951
952
1. Let |rpOrigin| be |globalObject|'s [=associated Document=]' s [=Document/origin=] .
952
953
1. If |rpOrigin| is not an [=opaque origin=] , and |rootUrl|'s [=url/host=] is equal
953
954
to |rpOrigin|'s [=host/registrable domain=], and |rootUrl|' s [=url/scheme=] is
954
- equal to |rpOrigin|'s [=origin/scheme=] , set |configInWellKnown | to true.
955
+ equal to |rpOrigin|'s [=origin/scheme=] , set |skipWellKnown | to true.
955
956
956
957
Note: Because domain cookies are valid across an entire site, there is no privacy
957
958
benefit from doing the well-known check if the RP and IDP are in the same site.
@@ -985,22 +986,18 @@ or failure.
985
986
[pull request] (https://github.com/whatwg/fetch/pull/1533) for details.
986
987
987
988
1. [=Fetch request=] with |wellKnownRequest| and |globalObject|, and with <var ignore> processResponseConsumeBody</var>
988
- set to the following steps given a <a spec=fetch for=/>response</a> |response| and |responseBody|:
989
+ set to the following steps, given a <a spec=fetch for=/>response</a> |response| and |responseBody|:
989
990
1. Let |json| be the result of [=extract the JSON fetch response=] from |response| and
990
991
|responseBody|.
991
- 1. [=converted to an IDL value|Convert =] |json| to an {{IdentityProviderWellKnown}} ,
992
- |discovery| .
992
+ 1. Set |wellKnown| to the result of [=converted to an IDL value|converting =] |json|
993
+ to an {{IdentityProviderWellKnown}} .
993
994
1. If one of the previous two steps threw an exception, or if the
994
- [=list/size=] of |discovery |["{{IdentityProviderWellKnown/provider_urls}}"] is
995
- greater than 1, set |configInWellKnown | to false .
995
+ [=list/size=] of |wellKnown |["{{IdentityProviderWellKnown/provider_urls}}"] is
996
+ greater than 1, set |wellKnown | to failure .
996
997
997
998
Issue: [relax] (https://github.com/fedidcg/FedCM/issues/333) the size of the
998
999
provider_urls array.
999
1000
1000
- 1. Otherwise, set to |configInWellKnown| to true if
1001
- |discovery|["{{IdentityProviderWellKnown/provider_urls}}"][0] [=string/is=] equal to
1002
- |provider|'s {{IdentityProviderConfig/configURL}} , and to false otherwise.
1003
-
1004
1001
1. Let |configRequest| be a new <a spec=fetch for=/>request</a> as follows:
1005
1002
1006
1003
: [=request/url=]
@@ -1038,11 +1035,31 @@ or failure.
1038
1035
1. [=converted to an IDL value|Convert=] |json| to an {{IdentityProviderAPIConfig}} stored
1039
1036
in |config|.
1040
1037
1. If one of the previous two steps threw an exception, set |config| to failure.
1041
- 1. Set |config|.{{IdentityProviderAPIConfig/login_url}} to the result of [=computing
1042
- the manifest URL=] with |provider|, |config| and |globalObject|.
1043
- 1. If |config|.{{IdentityProviderAPIConfig/login_url}} is null, return failure.
1044
- 1. Wait for both |config| and |configInWellKnown| to be set.
1045
- 1. If |configInWellKnown| is true, return |config|. Otherwise, return failure.
1038
+ 1. Set |login_url| to the result of [=computing the manifest URL=] with |provider|,
1039
+ |config|.{{IdentityProviderAPIConfig/login_url}} , and |globalObject|.
1040
+ 1. Set |accounts_url| to the result of [=computing the manifest URL=] with |provider|,
1041
+ |config|.{{IdentityProviderAPIConfig/accounts_endpoint}} , and |globalObject|.
1042
+ 1. If |login_url| or |accounts_url| is failure, set |config| to failure.
1043
+ 1. Wait for |config| to be set.
1044
+ 1. If |config| is failure, return failure.
1045
+ 1. If |skipWellKnown| is true, return |config|.
1046
+ 1. Wait for |wellKnown| to be set.
1047
+ 1. If |wellKnown| is failure, return failure.
1048
+ 1. If |wellKnown|.{{IdentityProviderWellKnown/accounts_endpoint}} and
1049
+ |wellKnown|.{{IdentityProviderWellKnown/login_url}} are set:
1050
+ 1. Let |well_known_accounts_url| be the result of [=computing the manifest URL=] with
1051
+ |provider|, |wellKnown|.{{IdentityProviderWellKnown/accounts_endpoint}} ,
1052
+ and |globalObject|.
1053
+ 1. Let |well_known_login_url| be the result of [=computing the manifest URL=] with |provider|,
1054
+ |wellKnown|.{{IdentityProviderWellKnown/login_url}} , and |globalObject|.
1055
+ 1. If |well_known_accounts_url| is not [=url/equal=] to |accounts_url|, return failure.
1056
+ 1. If |well_known_login_url| is not [=url/equal=] to |login_url|, return failure.
1057
+ 1. Otherwise:
1058
+ 1. Let |allowed_config_url| be the result of [=computing the manifest URL=] with |provider|,
1059
+ |wellKnown|.{{IdentityProviderWellKnown/provider_urls}} [0] , and |globalObject|.
1060
+ 1. If |allowed_config_url| is not [=url/equal=] to |configUrl|, return failure.
1061
+ 1. Return |config|.
1062
+
1046
1063
</div>
1047
1064
1048
1065
NOTE: a two-tier file system is used in order to prevent the [=IDP=] from easily determining the [=RP=]
@@ -1055,7 +1072,9 @@ path manipulation to fingerprint (for instance, by including the RP in the path)
1055
1072
1056
1073
<xmp class="idl">
1057
1074
dictionary IdentityProviderWellKnown {
1058
- required sequence<USVString> provider_urls;
1075
+ sequence<USVString> provider_urls;
1076
+ USVString accounts_endpoint;
1077
+ USVString login_url;
1059
1078
};
1060
1079
1061
1080
dictionary IdentityProviderIcon {
0 commit comments