@ SneakyThrows public static byte [ ] signJws ( final Key key , final byte [ ] value , final String algHeaderValue ) { val base64 = EncodingUtils . encodeBase64 ( value ) ; val jws = new JsonWebSignature ( ) ; jws . setEncodedPayload ( base64 ) ; jws . setAlgorithmHeaderValue ( algHeaderValue ) ; jws . setKey ( key ) ; jws . setHeader ( "typ" , "JWT" ) ; return jws . getCompactSerialization ( ) . getBytes ( StandardCharsets . UTF_8 ) ; }
Sign jws .