@Test public void transferIntoJwtClaimsTest() { JSONObject json = new JSONObject(); json.put("active", true); json.put("key", "valueTest"); Jwt jwt = new Jwt(); JwtUtil.transferIntoJwtClaims(json, jwt); final JwtClaims claims = jwt.getClaims(); assertEquals("true", claims.getClaimAsString("active")); assertEquals("valueTest", claims.getClaimAsString("key")); }
public static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt) { if (jsonObject == null || jwt == null) { return; } for (String key : jsonObject.keySet()) { final Object value = jsonObject.opt(key); jwt.getClaims().setClaimObject(key, value, true); } }
JwtUtil { public static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt) { if (jsonObject == null || jwt == null) { return; } for (String key : jsonObject.keySet()) { final Object value = jsonObject.opt(key); jwt.getClaims().setClaimObject(key, value, true); } } }
JwtUtil { public static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt) { if (jsonObject == null || jwt == null) { return; } for (String key : jsonObject.keySet()) { final Object value = jsonObject.opt(key); jwt.getClaims().setClaimObject(key, value, true); } }  }
JwtUtil { public static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt) { if (jsonObject == null || jwt == null) { return; } for (String key : jsonObject.keySet()) { final Object value = jsonObject.opt(key); jwt.getClaims().setClaimObject(key, value, true); } }  static void printAlgorithmsAndProviders(); static String bytesToHex(byte[] bytes); static byte[] getMessageDigestSHA256(String data); static byte[] getMessageDigestSHA384(String data); static byte[] getMessageDigestSHA512(String data); static PublicKey getPublicKey(
            String jwksUri, String jwks, SignatureAlgorithm signatureAlgorithm, String keyId); static JSONObject getJsonKey(String jwksUri, String jwks, String keyId); static JSONObject getJSONWebKeys(String jwksUri); static JSONObject getJSONWebKeys(String jwksUri, ClientExecutor executor); static JSONObject fromJson(String json); static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt); }
JwtUtil { public static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt) { if (jsonObject == null || jwt == null) { return; } for (String key : jsonObject.keySet()) { final Object value = jsonObject.opt(key); jwt.getClaims().setClaimObject(key, value, true); } }  static void printAlgorithmsAndProviders(); static String bytesToHex(byte[] bytes); static byte[] getMessageDigestSHA256(String data); static byte[] getMessageDigestSHA384(String data); static byte[] getMessageDigestSHA512(String data); static PublicKey getPublicKey(
            String jwksUri, String jwks, SignatureAlgorithm signatureAlgorithm, String keyId); static JSONObject getJsonKey(String jwksUri, String jwks, String keyId); static JSONObject getJSONWebKeys(String jwksUri); static JSONObject getJSONWebKeys(String jwksUri, ClientExecutor executor); static JSONObject fromJson(String json); static void transferIntoJwtClaims(JSONObject jsonObject, Jwt jwt);  }