JweSerializerpublic class JweDirectSerializer extends java.lang.Object implements JweSerializer
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
COULD_NOT_ENCRYPT |
|
static java.lang.String |
HEADER_IS_INVALID |
COULD_NOT_COMPACT, DELIMITER| Constructor | Description |
|---|---|
JweDirectSerializer(Serdes serdes,
java.util.Base64.Encoder encoder,
CipherSymmetricFactory cipherSymmetricFactory) |
| Modifier and Type | Method | Description |
|---|---|---|
java.io.ByteArrayOutputStream |
JWEToCompact(JWE jwe) |
Generates a compact JWE.
|
extractAuthTag, extractCipherText, toCompactpublic static final java.lang.String COULD_NOT_ENCRYPT
public static final java.lang.String HEADER_IS_INVALID
public JweDirectSerializer(Serdes serdes, java.util.Base64.Encoder encoder, CipherSymmetricFactory cipherSymmetricFactory)
public java.io.ByteArrayOutputStream JWEToCompact(JWE jwe) throws JsonToJwtException, CipherException, EncryptException
JWEToCompact in interface JweSerializerjwe - must have values for header, cek, payload. Ignores the value for iv and generates a new one.JsonToJwtException - if the header cannot be serialized.CipherException - if the cipher for encryption could not be instantiatedEncryptException - if the payload could not be encrypted