Micah Silverman
d112c62e5b
Refactored all occurrences of 'vector' to 'value' in the context of 'initialization value' per https://tools.ietf.org/html/rfc4949#page-9 as 'initialization vector' is deprecated
2017-10-14 08:26:23 -04:00
Micah Silverman
5d709bee80
removed ignore doclint for java 8. Resolved javadoc issues.
2017-10-10 15:30:48 -04:00
Micah Silverman
6541030161
Merge branch 'master' into jwe_java_9_update
2017-10-10 15:30:14 -04:00
Micah Silverman
91fd0fd3b4
Added support for Java 9 build and test run. Does not impact Java 8 build and test. Overrode some OSS version dependency version defaults to support Java 9. Updated javadocs in code to pass java 9 linter.
2017-10-09 20:15:18 -04:00
Micah Silverman
8cfc9f5cba
Merge branch 'master' into merge_master_jwe
2017-09-26 13:18:05 -04:00
Micah Silverman
5ffee1e3ac
Switched from jacoco to open-clover. Updated GzipCompressionCodec to improve coverage report.
2017-09-09 23:17:36 -04:00
Micah Silverman
7c6c7df926
Minor punctuation and sentence structure updates. Changed Json to JSON per spec.
2017-09-01 03:18:28 -07:00
Micah Silverman
d2ec644f7c
Merge branch 'master' into jwe_tidy
2017-09-01 03:18:10 -07:00
Aaron Wood
2b8ad0c05a
Similar to issue #68 ( https://github.com/jwtk/jjwt/issues/68 ), EC keys on Android do not implement ECPrivateKey. This changes the check in EllipticCurveSigner.java to use the same test as was used to solve issue #68 for RSA keys.
2017-05-24 15:33:50 -07:00
Les Hazlewood
8a6f588e81
Merge pull request #200 from roberterdin/master
...
Added addClaims function to JwtBuilder as described in Issue #196 .
2017-05-16 12:46:48 -07:00
Micah Silverman
2d6233fa78
Removed redundant/incorrect docs
2017-02-14 22:42:41 -08:00
Robert Erdin
b250af4149
Added addClaims function to JwtBuilder as described in Issue #196 .
...
This function does not overwrite existing claims (as compared to setClaims).
2017-01-10 13:22:23 +01:00
Les Hazlewood
4fd36dd1cb
fixed erroneous internal Groovy class reference
2016-10-07 15:48:21 -07:00
Les Hazlewood
89613e6520
Merge branch 'master' into jwe
...
# Conflicts:
# pom.xml
2016-10-07 13:48:46 -07:00
sainaen
13906d3746
Implement type conversions of integral claim values
...
Jackson chooses the target type for JSON numbers based on their value,
while deserializing without correct typing information present.
This leads to a confusing behavior:
String token = Jwts.builder()
.claim("byte", (byte) 42)
.claim("short", (short) 42)
.claim("int", 42)
.claim("long_small", (long) 42)
.claim("long_big", ((long) Integer.MAX_VALUE) + 42)
.compact();
Claims claims = (Claims) Jwts.parser().parse(token).getBody();
claims.get("int", Integer.class); // => 42
claims.get("long_big", Long.class); // => ((long) Integer.MAX_VALUE) + 42
claims.get("long_small", Long.class); // throws RequiredTypeException: required=Long, found=Integer
claims.get("short", Short.class); // throws RequiredTypeException: required=Short, found=Integer
claims.get("byte", Byte.class); // throws RequiredTypeException: required=Byte, found=Integer
With this commit, `DefaultClaims.getClaim(String, Class<T>)` will
correctly handle cases when required type is `Long`, `Integer`, `Short`
or `Byte`: check that value fits in the required type and cast to it.
// ... setup is the same as above
claims.get("int", Integer.class); // => 42
claims.get("long_big", Long.class); // => ((long) Integer.MAX_VALUE) + 42
claims.get("long_small", Long.class); // => (long) 42
claims.get("short", Short.class); // => (short) 42
claims.get("byte", Byte.class); // => (byte) 42
Fixes #142 .
2016-09-20 12:49:01 +03:00
Les Hazlewood
6c4b58e4fe
edits to exception message to be a little more helpful and to ensure previous GH issue tests passed
2016-09-12 16:40:52 -07:00
Les Hazlewood
ab4f9ff9e8
edits to exception message to be a little more helpful and to ensure previous GH issue tests passed
2016-09-12 16:39:17 -07:00
Les Hazlewood
8f1b528d8c
Minor edits to @MichaelSims pull request - prepping for release
2016-09-12 16:12:30 -07:00
Les Hazlewood
ff932e9838
Merge branch 'master' of https://github.com/MichaelSims/jjwt into MichaelSims-master
...
# Conflicts:
# src/main/java/io/jsonwebtoken/impl/DefaultJwtParser.java
2016-09-12 16:03:53 -07:00
Les Hazlewood
af01cca922
122: added code comments so readers understand that JWT mandates seconds, not milliseconds
2016-09-12 10:37:34 -07:00
Les Hazlewood
1974069561
107: ensured exception message printed UTC times correctly
2016-09-11 14:04:20 -07:00
Les Hazlewood
0f63ec8012
Merge pull request #117 from matzon/master
...
implement hashCode and equals in JwtMap
2016-09-11 12:57:02 -07:00
Les Hazlewood
79e95856a4
161: upgraded library versions to latest stable
2016-09-11 12:48:48 -07:00
Les Hazlewood
a7c6205590
sanity checkpoint
2016-09-11 12:34:30 -07:00
benoit
9735d1ad98
improve jwt parser memory allocation
...
re-use buffer instead of creating new ones
avoid creating unneeded buffers in the Strings util methods
Stop continuously copying array with StringBuilder#deleteCharAt
work directly on StringBuilder instead of creating a temporary String
test added to cover the modified methods
2016-08-31 16:39:42 +02:00
Michael Sims
3fb794ee91
#61 : Add support for clock skew to JwtParser for exp and nbf claims
2016-08-29 16:34:00 -05:00
Les Hazlewood
e55ea34e95
Merge pull request #105 from aarondav/patch-2
...
Avoid potentially critical vulnerability in ECDSA signature validation
2016-07-04 11:56:48 -07:00
Les Hazlewood
07534487d3
Merge pull request #132 from alexanderkjall/patch-1
...
javadoc typo
2016-07-04 11:51:28 -07:00
Martin Treurnicht
c3e5f95242
Added more descriptive backwards compatibility information
2016-06-30 13:46:07 -07:00
Martin Treurnicht
174e1b13b8
Add back swarm test for 100% coverage
2016-06-28 12:19:54 -07:00
Martin Treurnicht
61510dfca5
Cleanup as per request of https://github.com/lhazlewood
2016-06-28 12:12:40 -07:00
Martin Treurnicht
c60deebb64
Removed java 8 dependencies in test
2016-06-27 16:02:06 -07:00
Martin Treurnicht
a73e0044b8
Fixed ECDSA Signing and verification to use R + S curve points as per spec https://tools.ietf.org/html/rfc7515#page-45
2016-06-27 15:43:35 -07:00
Alexander Kjäll
26a14fd3c3
javadoc typo
...
Updated the number of bits for the HS512 algorithm in the javadoc comment.
2016-06-13 14:40:35 +02:00
Brian Matzon
f08386c63b
formatting
2016-06-08 00:20:23 +02:00
Brian Matzon
4be4912cb2
moved Java test into groovy
2016-06-06 23:43:52 +02:00
Brian Matzon
39ee58a511
implement hashCode and equals in JwtMap
2016-04-27 12:15:36 +02:00
Les Hazlewood
9b434cdf9c
EncryptionAlgorithm changes, class cleanup, test coverage, etc. AES encryption, both GCM and HmacSha2 variants are complete. Classes might be moved to another package. Have not yet started Builder and Parser work to support JWE compact strings.
2016-04-21 18:16:32 -07:00
Les Hazlewood
d111dc8b22
EncryptionAlgorithm changes, class cleanup, test coverage, etc. Still a work in progress, but getting close to be finished with AES encryption.
2016-04-20 22:24:05 -07:00
Les Hazlewood
8ea397b609
Merge branch 'master' into jwe
2016-04-17 14:26:51 -07:00
Les Hazlewood
29f980c5c9
coverage improvements. Removed unnecessary line from DefaultClaims
2016-04-17 14:26:28 -07:00
Les Hazlewood
cb5734d8a6
Merge branch 'master' into jwe
...
# Conflicts:
# src/main/java/io/jsonwebtoken/Header.java
# src/main/java/io/jsonwebtoken/impl/DefaultHeader.java
2016-04-17 13:54:07 -07:00
Les Hazlewood
e392524919
cherry pick from c62d012cf80341747f3f3aa8b43127cde0ab4dce: javadoc cleanup, compression backwards compatibility change
...
cherry pick from c62d012cf80341747f3f3aa8b43127cde0ab4dce: javadoc cleanup, compression backwards compatibility change
113: increased code coverage threshold for DefaultJwtParser and DefaultJwtBuilder
2016-04-17 13:51:30 -07:00
Les Hazlewood
e7aff4adf3
113: javadoc cleanup, compression backwards compatibility change, code coverage enhancements, cobertura config cleanup
2016-04-17 13:22:39 -07:00
Les Hazlewood
c62d012cf8
113: javadoc cleanup, compression backwards compatibility change
2016-04-15 17:14:10 -07:00
Les Hazlewood
fbce510164
113: test enhancements for the new crypto classes (fixed branch coverage failures)
2016-04-12 20:29:24 -07:00
Les Hazlewood
3bcd7632cd
113: moar tests
2016-04-12 18:56:48 -07:00
Les Hazlewood
716c6fd500
113: initial JWE (shared key AES) encryption support
2016-04-12 18:50:24 -07:00
Les Hazlewood
3dfae9a31d
109: removed implementation coupling from Clock interface. DefaultClock.INSTANCE achieves the same thing without coupling.
2016-04-01 18:26:59 -07:00
Les Hazlewood
72e0e3b23c
109: enabled injection of a time source - a 'Clock'
2016-04-01 18:15:37 -07:00