Skip to content

Commit

Permalink
[Spec] Rename rp --> rpId in CollectedClientAdditionalPaymentData
Browse files Browse the repository at this point in the history
To align with WebAuthn, we should use the term rpId here. This is a breaking
change, but implementations can mitigate the breakage by continuing to include
the old 'rp' name going forwards.

See #191
  • Loading branch information
stephenmcgruer committed Aug 10, 2022
1 parent 7204dc0 commit dd14bfa
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ The [=steps to respond to a payment request=] for this payment method, for a giv

: {{AuthenticationExtensionsPaymentInputs/isPayment}}
:: The boolean value `true`.
: {{AuthenticationExtensionsPaymentInputs/rp}}
: {{AuthenticationExtensionsPaymentInputs/rpId}}
:: |data|["{{SecurePaymentConfirmationRequest/rpId}}"]
: {{AuthenticationExtensionsPaymentInputs/topOrigin}}
:: |topOrigin|
Expand Down Expand Up @@ -872,7 +872,7 @@ directly; for authentication the extension can only be accessed via
boolean isPayment;

// Only used for authentication.
USVString rp;
USVString rpId;
USVString topOrigin;
DOMString payeeName;
USVString payeeOrigin;
Expand All @@ -887,7 +887,7 @@ directly; for authentication the extension can only be accessed via

<div class="note">**TODO**: Find a better way to do this. Needed currently because other members are auth-time only.</div>

: <dfn>rp</dfn> member
: <dfn>rpId</dfn> member
:: The [=Relying Party=] id of the credential(s) being used. Only used at authentication time; not registration.

: <dfn>topOrigin</dfn> member
Expand Down Expand Up @@ -989,8 +989,8 @@ directly; for authentication the extension can only be accessed via
1. {{CollectedClientPaymentData/payment}} set to a new
{{CollectedClientAdditionalPaymentData}} whose fields are:

: {{CollectedClientAdditionalPaymentData/rp}}
:: |extension_inputs|["{{AuthenticationExtensionsPaymentInputs/rp}}"]
: {{CollectedClientAdditionalPaymentData/rpId}}
:: |extension_inputs|["{{AuthenticationExtensionsPaymentInputs/rpId}}"]
: {{CollectedClientAdditionalPaymentData/topOrigin}}
:: |extension_inputs|["{{AuthenticationExtensionsPaymentInputs/topOrigin}}"]
: {{CollectedClientAdditionalPaymentData/payeeName}}
Expand Down Expand Up @@ -1036,7 +1036,7 @@ The {{CollectedClientPaymentData}} dictionary inherits from

<xmp class="idl">
dictionary CollectedClientAdditionalPaymentData {
required USVString rp;
required USVString rpId;
required USVString topOrigin;
DOMString payeeName;
USVString payeeOrigin;
Expand All @@ -1049,9 +1049,13 @@ The {{CollectedClientAdditionalPaymentData}} dictionary contains the following
fields:

<dl dfn-type="dict-member" dfn-for="CollectedClientAdditionalPaymentData">
: <dfn>rp</dfn> member
: <dfn>rpId</dfn> member
:: The id of the [=Relying Party=] that created the credential.

NOTE: For historical reasons, some implementations may additionally
include this parameter with the name `rp`. The values of `rp` and
`rpId` must be the same if both are present.

: <dfn>topOrigin</dfn> member
:: The origin of the top level context that requested to sign the transaction details.

Expand Down Expand Up @@ -1173,7 +1177,7 @@ Confirmation, the [=Relying Party=] MUST proceed as follows:

1. After step 13, insert the following steps:

* Verify that the value of |C|["{{CollectedClientPaymentData/payment}}"]["{{CollectedClientAdditionalPaymentData/rp}}"]
* Verify that the value of |C|["{{CollectedClientPaymentData/payment}}"]["{{CollectedClientAdditionalPaymentData/rpId}}"]
matches the [=Relying Party=]'s origin.

* Verify that the value of |C|["{{CollectedClientPaymentData/payment}}"]["{{CollectedClientAdditionalPaymentData/topOrigin}}"]
Expand Down

0 comments on commit dd14bfa

Please sign in to comment.