mirror of
https://github.com/danbulant/jose
synced 2026-05-24 20:41:46 +00:00
refactor: check general jws sign recipients length
This commit is contained in:
parent
626d91f201
commit
2d58cbcf12
1 changed files with 4 additions and 0 deletions
|
|
@ -141,6 +141,10 @@ export default class GeneralSign {
|
|||
* Signs and resolves the value of the General JWS object.
|
||||
*/
|
||||
async sign(): Promise<GeneralJWS> {
|
||||
if (!this._signatures.length) {
|
||||
throw new JWSInvalid('at least one signature must be added')
|
||||
}
|
||||
|
||||
const jws: GeneralJWS = {
|
||||
signatures: [],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue