From b1635f4bdedbbd27d9a1b38801c8bf0525bd107b Mon Sep 17 00:00:00 2001 From: Steve Hu Date: Thu, 6 Apr 2017 14:40:33 -0400 Subject: [PATCH] fixes #46 add kid to the JWT header when issuing JWT token --- security/src/main/java/com/networknt/security/JwtHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/src/main/java/com/networknt/security/JwtHelper.java b/security/src/main/java/com/networknt/security/JwtHelper.java index 30bec69c78..b1279aafc8 100644 --- a/security/src/main/java/com/networknt/security/JwtHelper.java +++ b/security/src/main/java/com/networknt/security/JwtHelper.java @@ -87,7 +87,7 @@ public static String getJwt(JwtClaims claims) throws JoseException { // Set the signature algorithm on the JWT/JWS that will integrity protect the claims jws.setAlgorithmHeaderValue(AlgorithmIdentifiers.RSA_USING_SHA256); - + jws.setHeader(KID, jwtConfig.getKey().getKid()); // Sign the JWS and produce the compact serialization, which will be the inner JWT/JWS // representation, which is a string consisting of three dot ('.') separated // base64url-encoded parts in the form Header.Payload.Signature