From 91fd0fd3b4337bcfc5921f4c640d20db3dd31c08 Mon Sep 17 00:00:00 2001
From: Micah Silverman It is easiest to create a {@code Claims} instance by calling one of the
* {@link Jwts#claims() JWTs.claims()} factory methods. 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. It is easiest to create a {@code Header} instance by calling one of the
* {@link Jwts#header() JWTs.header()} factory methods.
- * 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. Creation
+ * Creation
*
* Compatibility Warning
+ * Compatibility Warning
* Creation
+ * Creation
*
* calg
(Compression Algorithm) header parameter value. A {@code null} value will remove
* the property from the JSON map.
*
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 7f5388f7..a44c0b15 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: * *
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; * *
---|
Signature Algorithm | Generated Key Size | ||||||
---|---|---|---|---|---|---|---|
Signature Algorithm | Generated Key Size |
---|---|
HS256 | 256 bits (32 bytes) |
HS384 | 384 bits (48 bytes) |
HS512 | 512 bits (64 bytes) |
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
From d229631af4944ae742409f144a71d56cbdd6358e Mon Sep 17 00:00:00 2001
From: Micah Silverman
Date: Mon, 9 Oct 2017 20:16:06 -0400
Subject: [PATCH 2/2] Added Java 9 build to Travis file.
---
.travis.yml | 1 +
pom.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 0d370bd3..3f4905b9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,7 @@ language: java
jdk:
- openjdk7
- oraclejdk8
+ - oraclejdk9
before_install:
- export BUILD_COVERAGE="$([ $TRAVIS_JDK_VERSION == 'oraclejdk8' ] && echo 'true')"
diff --git a/pom.xml b/pom.xml
index 8b64e759..f2871e2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@
3.0.2
3.6.1
- 1.8
+ 1.7
UTF-8
${user.name}-${maven.build.timestamp}