Object Jws

  • All Implemented Interfaces:

    
    public class Jws
    
                        

    Json Web Signature (JWS) is a compact signature format that is used to secure messages. Spec: https://datatracker.ietf.org/doc/html/rfc7515

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static Jws INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final DecodedJws decode(String jws, ByteArray detachedPayload) Decode a JWS into its parts.
      final String sign(BearerDid bearerDid, ByteArray payload, Boolean detached) Sign a payload using a Bearer DID.
      final DecodedJws verify(String jws, ByteArray detachedPayload) Verify a JWS.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • decode

         final DecodedJws decode(String jws, ByteArray detachedPayload)

        Decode a JWS into its parts.

        Parameters:
        jws - The JWS to decode
        Returns:

        DecodedJws

      • sign

         final String sign(BearerDid bearerDid, ByteArray payload, Boolean detached)

        Sign a payload using a Bearer DID.

        Parameters:
        bearerDid - The Bearer DID to sign with
        payload - The payload to sign
        detached - Whether to include the payload in the JWS string output