dwn-sdk-js
dwn-sdk-js copied to clipboard
Explicit check to ensure only 1 signer
Should we add an explicit check to ensure that there's only 1 signer?
https://github.com/TBD54566975/dwn-sdk-js/blob/fcea84929e12dd3e3ef0e8866b0e592a025786fa/src/interfaces/permissions/handlers/permissions-request.ts#L21-L28
i can have a look at this with some guidance on how to get started
The easiest thing to do is to just do a length check against jws.signatures.length
, and throw if it's not 1. Bulk of the work is probably just right a test to prove that more than one signature initially was allowed, and no longer allowed.
https://github.com/TBD54566975/dwn-sdk-js/pull/152
Already addressed by: https://github.com/TBD54566975/dwn-sdk-js/blob/main/src/core/auth.ts#L45