WICG / trust-token-api

Trust Token API
https://wicg.github.io/trust-token-api/
Other
415 stars 82 forks source link

hasPrivateToken type parameter is pointless #222

Closed martinthomson closed 1 year ago

martinthomson commented 1 year ago

This parameter is mandatory and fixed. It can be removed.

dvorak42 commented 1 year ago

The intention with the parameter (and the type parameter in other APIs is to allow for other token types in the future if the API is expanded to support other forms/types of tokens).

Some other options we considered is having a bespoke hasPrivateXXXToken for each type of token, or making it default to PST if its not specified and then adding the type parameter back into the API in the future.

miketaylr commented 1 year ago

making it default to PST if its not specified and then adding the type parameter back into the API in the future.

This seems nicer from an developer ergonomics POV.

martinthomson commented 1 year ago

YAGNI would seem to apply here, also this. If some future extension needs to be able to signal options, then they can deal with that problem by adding a parameter (or an options dictionary). Don't build an extension point that you will have to defend until then on the off chance someone might, just maybe, want it some day.

dvorak42 commented 1 year ago

Agreed that its a good point to remove it. To avoid breaking current implementation, we can update the spec to remove it and have it ignore the type param for now.

dvorak42 commented 1 year ago

Closing this with the removal of the type parameter.