SstJws
Represents a Json Web Signature (JWS)
Class Methods
from:
Answer a new JWS object by parsing @anObject.
The object is assumed to be in compact format.
Arguments:
anObject - @see implementors of asJws:
Answers:
<SstJws>
Raises:
<SstJoseException>
from:compact:
Answer a new JWS object by parsing @anObject.
Use compact parser if @isCompact is true, otherwise use Json parser.
Arguments:
anObject - @see implementors of asJws:
isCompact - <Boolean>
Answers:
<SstJws>
Raises:
<SstJoseException>
Instance Methods
asCompactString
Return the JWS compact serialization for this Jws.
Answers:
<EsString>
asJsonObject
Answer the neo json object form of this Jws
Answers:
<NeoJSONObject>
verifyWith:
Returns an EsFuture that resolves to true if the content of this object can be decrypted and verified using a Jwk in the Jwk store @anSstJwkStore.
The future fails with a SstJoseNoSupportedAlgorithmException when no recipient uses an algorithm supported by this library implementation.
Resolves to false otherwise.
The verification may use any supported algorithm, except 'none'.
Arguments:
sstJwkStore - <SstJwkStore> which contains the necessary keys for verification/decryption.
Answers:
<EsFuture>
verifyWith:allowedAlgorithms:
Returns an EsFuture that resolves to true if the content of this object can be decrypted and verified using a Jwk in the Jwk store @anSstJwkStore.
Otherwise, the future resolves to false or fails with a SstJoseNoSupportedAlgorithmException otherwise.
When @allowedAlgorithms is nil, all algorithms are allowed except 'none'.
If none of the recipients uses an algorithm supported by this library implementation, the future fails with a SstJoseNoSupportedAlgorithmException.
See SstJwa class variable @AllAlgorithms for the list of supported algorithms in this implementation.
Arguments:
sstJwkStore - <SstJwkStore> which contains the necessary keys for verification/decryption.
allowedAlgorithms - <UndefinedObject | Collection of String> where each string is an algorithm name (as defined in RFC 7518, section-3.1) that is allowed to verify/decrypt the payload.
Answers:
<EsFuture>
Last modified date: 01/09/2026