It is easiest to create a {@code Claims} instance by calling one of the * {@link Jwts#claims() JWTs.claims()} factory methods.
diff --git a/src/main/java/io/jsonwebtoken/CompressionCodecs.java b/src/main/java/io/jsonwebtoken/CompressionCodecs.java index 779f9893..4374197a 100644 --- a/src/main/java/io/jsonwebtoken/CompressionCodecs.java +++ b/src/main/java/io/jsonwebtoken/CompressionCodecs.java @@ -24,7 +24,7 @@ public final class CompressionCodecs { /** * Codec implementing the gzip compression algorithm. - *This is not a standard JWA compression algorithm. Be sure to use this only when you are confident * that all parties accessing the token support the gzip algorithm.
*If you're concerned about compatibility, the {@link #DEFLATE DEFLATE} code is JWA standards-compliant.
diff --git a/src/main/java/io/jsonwebtoken/Header.java b/src/main/java/io/jsonwebtoken/Header.java index 1d8ab9af..3eedd64a 100644 --- a/src/main/java/io/jsonwebtoken/Header.java +++ b/src/main/java/io/jsonwebtoken/Header.java @@ -30,7 +30,7 @@ import java.util.Map; * header.{@link Map#put(Object, Object) put}("headerParamName", "headerParamValue"); * * - *It is easiest to create a {@code Header} instance by calling one of the * {@link Jwts#header() JWTs.header()} factory methods.
@@ -113,7 +113,7 @@ public interface Headerzip
* (Compression Algorithm) header parameter value or {@code null} if not present.
*
- * While the JWT family of specifications only defines the
+ * The compression algorithm is NOT part of the JWT specification
+ * and must be used carefully since, is not expected that other libraries (including previous versions of this one)
+ * be able to deserialize a compressed JTW body correctly. While the JWT family of specifications only defines the The JWT family of specifications defines compression only for JWE (JSON Web Encryption)
* tokens. Even so, JJWT will also support compression for JWS tokens as well if you choose to use it.
diff --git a/src/main/java/io/jsonwebtoken/JwtParser.java b/src/main/java/io/jsonwebtoken/JwtParser.java
index c0fa1603..1dcdcf58 100644
--- a/src/main/java/io/jsonwebtoken/JwtParser.java
+++ b/src/main/java/io/jsonwebtoken/JwtParser.java
@@ -228,10 +228,10 @@ public interface JwtParser {
* Sets the {@link CompressionCodecResolver} used to acquire the {@link CompressionCodec} that should be used to
* decompress the JWT body. If the parsed JWT is not compressed, this resolver is not used.
* NOTE: Compression is not defined by the JWT Specification, and it is not expected that other libraries
- * (including JJWT versions < 0.6.0) are able to consume a compressed JWT body correctly. This method is only
- * useful if the compact JWT was compressed with JJWT >= 0.6.0 or another library that you know implements
+ * (including JJWT versions < 0.6.0) are able to consume a compressed JWT body correctly. This method is only
+ * useful if the compact JWT was compressed with JJWT >= 0.6.0 or another library that you know implements
* the same behavior. JJWT's default {@link JwtParser} implementation supports both the
* {@link io.jsonwebtoken.impl.compression.DeflateCompressionCodec DEFLATE}
* and {@link io.jsonwebtoken.impl.compression.GzipCompressionCodec GZIP} algorithms by default - you do not need to
diff --git a/src/main/java/io/jsonwebtoken/SignatureAlgorithm.java b/src/main/java/io/jsonwebtoken/SignatureAlgorithm.java
index 33983d05..b55ebc32 100644
--- a/src/main/java/io/jsonwebtoken/SignatureAlgorithm.java
+++ b/src/main/java/io/jsonwebtoken/SignatureAlgorithm.java
@@ -130,6 +130,7 @@ public enum SignatureAlgorithm {
* following table:
*
* A {@code SigningKeyResolver} is invoked once during parsing before the signature is verified. If you only need to resolve a signing key for a particular JWS (either a plaintext or Claims JWS), consider using
* the {@link io.jsonwebtoken.SigningKeyResolverAdapter} and overriding only the method you need to support instead of
diff --git a/src/main/java/io/jsonwebtoken/impl/crypto/MacProvider.java b/src/main/java/io/jsonwebtoken/impl/crypto/MacProvider.java
index 1ce280bb..aa731e3d 100644
--- a/src/main/java/io/jsonwebtoken/impl/crypto/MacProvider.java
+++ b/src/main/java/io/jsonwebtoken/impl/crypto/MacProvider.java
@@ -67,7 +67,7 @@ public abstract class MacProvider extends SignatureProvider {
* according to the specified {@code SignatureAlgorithm} using the specified SecureRandom number generator. This
* implementation returns secure-random key sizes as follows:
*
- * zip
header in the JWE
* (JSON Web Encryption) specification, JJWT will also support compression for JWS as well if you choose to use it.
@@ -130,8 +130,12 @@ public interface Headerzip
* (Compression Algorithm) header parameter value. A {@code null} value will remove
* the property from the JSON map.
+ * Compatiblity Note
+ * Compatiblity Note
*
* zip
header in the JWE
* (JSON Web Encryption) specification, JJWT will also support compression for JWS as well if you choose to use it.
diff --git a/src/main/java/io/jsonwebtoken/JwtBuilder.java b/src/main/java/io/jsonwebtoken/JwtBuilder.java
index 782352f0..13df44fa 100644
--- a/src/main/java/io/jsonwebtoken/JwtBuilder.java
+++ b/src/main/java/io/jsonwebtoken/JwtBuilder.java
@@ -368,7 +368,7 @@ public interface JwtBuilder extends ClaimsMutatorCompatibility Warning
+ * Compatibility Warning
*
* Default Support
+ * Default Support
*
+ *
* SignatureAlgorithm
diff --git a/src/main/java/io/jsonwebtoken/SigningKeyResolver.java b/src/main/java/io/jsonwebtoken/SigningKeyResolver.java
index b068db9d..fbd9887f 100644
--- a/src/main/java/io/jsonwebtoken/SigningKeyResolver.java
+++ b/src/main/java/io/jsonwebtoken/SigningKeyResolver.java
@@ -38,7 +38,7 @@ import java.security.Key;
*
* SigningKeyResolverAdapter
+ * SigningKeyResolverAdapter
*
*
Signature Algorithm Generated Key Size
+ *
*
diff --git a/src/main/java/io/jsonwebtoken/impl/serialization/SerializationCodec.java b/src/main/java/io/jsonwebtoken/impl/serialization/SerializationCodec.java
index a3c25357..bbd7d417 100644
--- a/src/main/java/io/jsonwebtoken/impl/serialization/SerializationCodec.java
+++ b/src/main/java/io/jsonwebtoken/impl/serialization/SerializationCodec.java
@@ -18,10 +18,11 @@ public interface SerializationCodec {
/**
* Deserialize a {@code byte[]} to an {@code object} of an specific {@code type}
+ *
* Signature Algorithm Generated Key Size
* HS256 256 bits (32 bytes) HS384 384 bits (48 bytes)
* HS512 512 bits (64 bytes)
* bytes[] serialized = ...
* Map instance = serializationCodec.deserialize(serialized, Map.class);
- *
+ *
*
* @param bytes of the serialized object.
* @param targetClass of the instance to return.
diff --git a/src/main/java/io/jsonwebtoken/lang/Strings.java b/src/main/java/io/jsonwebtoken/lang/Strings.java
index a93cf340..338803f9 100644
--- a/src/main/java/io/jsonwebtoken/lang/Strings.java
+++ b/src/main/java/io/jsonwebtoken/lang/Strings.java
@@ -438,7 +438,7 @@ public final class Strings {
* Quote the given String with single quotes.
* @param str the input String (e.g. "myString")
* @return the quoted String (e.g. "'myString'"),
- * or null
if the input was
null
+ * or null
if the input was null
*/
public static String quote(String str) {
return (str != null ? "'" + str + "'" : null);
@@ -513,7 +513,7 @@ public final class Strings {
/**
* Extract the filename from the given path,
- * e.g. "mypath/myfile.txt" -> "myfile.txt".
+ * e.g. "mypath/myfile.txt" -> "myfile.txt".
* @param path the file path (may be null
)
* @return the extracted filename, or null
if none
*/
@@ -527,7 +527,7 @@ public final class Strings {
/**
* Extract the filename extension from the given path,
- * e.g. "mypath/myfile.txt" -> "txt".
+ * e.g. "mypath/myfile.txt" -> "txt".
* @param path the file path (may be null
)
* @return the extracted filename extension, or null
if none
*/
@@ -548,7 +548,7 @@ public final class Strings {
/**
* Strip the filename extension from the given path,
- * e.g. "mypath/myfile.txt" -> "mypath/myfile".
+ * e.g. "mypath/myfile.txt" -> "mypath/myfile".
* @param path the file path (may be null
)
* @return the path with stripped filename extension,
* or null
if none