id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
17517521_92
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldFailRSA512VerificationWhenProvidedPublicKeyIsNull() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA512withRSA\");\n except...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_142
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA256VerificationWhenUsingPrivateKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA256withECDSA\");\n exception....
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_284
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldThrowWhenConvertingHeaderIfNullJson() throws Exception {\n exception.expect(JWTDecodeException.class);\n exception.expectMessage(\"The string 'null' doesn't have a valid JSON format.\");\n parser.parseHeader(null);\n }", "class_method_signature": "JWTP...
{ "fields": [ { "declarator": "payloadReader", "modifier": "private final", "original_string": "private final ObjectReader payloadReader;", "type": "ObjectReader", "var_name": "payloadReader" }, { "declarator": "headerReader", "modifier": "private final", "o...
{ "body": "@Override\n public Header parseHeader(String json) throws JWTDecodeException {\n if (json == null) {\n throw decodeException();\n }\n\n try {\n return headerReader.readValue(json);\n } catch (IOException e) {\n throw decodeException(json);\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_135
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldPassECDSA256VerificationWithJOSESignature() throws Exception {\n String jwt = \"eyJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJhdXRoMCJ9.4iVk3-Y0v4RT4_9IaQlp-8dZ_4fsTzIylgrPTDLrEvTHBTyVS3tgPbr2_IZfLETtiKRqCg0aQ5sh9eIsTTwB1g\";\n ECKey key = (ECKey) readPublicKeyFromFile(PUBLIC_K...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_162
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA384VerificationWithInvalidPublicKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA384withECDSA\");\n String jw...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_2
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetHeader() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ\");\n assertThat(jwt, is(notNullValue()));\n assertThat(jwt.getHeader(), is(\"eyJhbGciOiJIUzI1NiJ9\"));\n }", "class_met...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public String getHeader() {\n return parts[0];\n }", "class_method_signature": "JWTDecoder.getHeader()", "constructor": false, "full_signature": "@Override public String getHeader()", "identifier": "getHeader", "invocations": [], "modifiers": "@Override public", "para...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_318
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetStringArrayWhenParsingTextNode() throws Exception {\n Map<String, JsonNode> tree = new HashMap<>();\n TextNode textNode = new TextNode(\"something\");\n tree.put(\"key\", textNode);\n\n List<String> values = deserializer.getStringOrArray(tree, \"k...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java", "identi...
{ "body": "List<String> getStringOrArray(Map<String, JsonNode> tree, String claimName) throws JWTDecodeException {\n JsonNode node = tree.get(claimName);\n if (node == null || node.isNull() || !(node.isArray() || node.isTextual())) {\n return null;\n }\n if (node.isTextual() && ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_174
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA512VerificationWhenUsingPrivateKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA512withECDSA\");\n exception....
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_123
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldFailHMAC512VerificationWithInvalidSecretBytes() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: HmacSHA512\");\n String jwt = ...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_30
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowOnSplitTokenWithLessThan3Parts() throws Exception {\n exception.expect(JWTDecodeException.class);\n exception.expectMessage(\"The token was expected to have 3 parts, but got 2.\");\n String token = \"two.parts\";\n TokenUtils.splitToken(token);\...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/TokenUtils.java", "identifier": "TokenUtils", "interfaces": "", "methods": [ { "class_method_signature": "TokenUtils.splitToken(String token)", "constructor": false, "full_signature": "static String[] splitToken(String token)", ...
{ "body": "static String[] splitToken(String token) throws JWTDecodeException {\n String[] parts = token.split(\"\\\\.\");\n if (parts.length == 2 && token.endsWith(\".\")) {\n //Tokens with alg='none' have empty String as Signature.\n parts = new String[]{parts[0], parts[1], \"\"}...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_271
{ "fields": [ { "declarator": "writer", "modifier": "private", "original_string": "private StringWriter writer;", "type": "StringWriter", "var_name": "writer" }, { "declarator": "serializer", "modifier": "private", "original_string": "private PayloadSerializ...
{ "body": "@Test\n public void shouldSerializeStrings() throws Exception {\n ClaimsHolder holder = holderFor(\"name\", \"Auth0 Inc\");\n serializer.serialize(holder, jsonGenerator, serializerProvider);\n jsonGenerator.flush();\n\n assertThat(writer.toString(), is(equalTo(\"{\\\"name\\\"...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadSerializer.java", "identifier": "PayloadSerializer", "interfaces": "", "methods": [ { "class_method_signature": "PayloadSerializer.PayloadSerializer()", "constructor": true, "full_signature": "public PayloadSerializer(...
{ "body": "@Override\n public void serialize(ClaimsHolder holder, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n for (Map.Entry<String, Object> e : holder.getClaims().entrySet()) {\n switch (e.getKey()) {\n case PublicClaim...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_158
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldPassECDSA384VerificationWithJOSESignatureWithBothKeys() throws Exception {\n String jwt = \"eyJhbGciOiJFUzM4NCJ9.eyJpc3MiOiJhdXRoMCJ9.50UU5VKNdF1wfykY8jQBKpvuHZoe6IZBJm5NvoB8bR-hnRg6ti-CHbmvoRtlLfnHfwITa_8cJMy6TenMC2g63GQHytc8rYoXqbwtS4R0Ko_AXbLFUmfxnGnMC6v4MS_z\";\n ...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_67
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowECDSA384InstanceWithNullKey() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"Both provided Keys cannot be null.\");\n ECKey key = null;\n Algorithm.ECDSA384(key);\n }", "class_method_signa...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm ECDSA384(ECDSAKeyProvider keyProvider) throws IllegalArgumentException {\n return new ECDSAAlgorithm(\"ES384\", \"SHA384withECDSA\", 48, keyProvider);\n }", "class_method_signature": "Algorithm.ECDSA384(ECDSAKeyProvider keyProvider)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_88
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldFailRSA384VerificationWhenUsingPrivateKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA384withRSA\");\n exception.expe...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_226
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldGetStringAudience() throws Exception {\n String token = \"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJKYWNrIFJleWVzIn0.a4I9BBhPt1OB1GW67g2P1bEHgi6zgOjGUL4LvhE9Dgc\";\n DecodedJWT jwt = JWT.require(Algorithm.HMAC256(\"secret\"))\n .build()\n .veri...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_71
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowECDSA512InstanceWithNullKeys() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"Both provided Keys cannot be null.\");\n Algorithm.ECDSA512(null, null);\n }", "class_method_signature": "AlgorithmTe...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm ECDSA512(ECDSAKeyProvider keyProvider) throws IllegalArgumentException {\n return new ECDSAAlgorithm(\"ES512\", \"SHA512withECDSA\", 66, keyProvider);\n }", "class_method_signature": "Algorithm.ECDSA512(ECDSAKeyProvider keyProvider)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_230
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldGetId() throws Exception {\n String token = \"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxMjM0NTY3ODkwIn0.m3zgEfVUFOd-CvL3xG5BuOWLzb0zMQZCqiVNQQOPOvA\";\n JWTVerifier.BaseVerification verification = (JWTVerifier.BaseVerification) JWT.require(Algorithm.HMAC256(\"secret\"));\n...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_119
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldFailHMAC384VerificationWithInvalidSecretString() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: HmacSHA384\");\n String jwt =...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_288
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@SuppressWarnings(\"Convert2Diamond\")\n @Test\n public void shouldHaveUnmodifiableTreeWhenInstantiatedWithNonNullTree() throws Exception {\n exception.expect(UnsupportedOperationException.class);\n BasicHeader header = new BasicHeader(null, null, null, null, new HashMap<String, JsonNod...
{ "fields": [ { "declarator": "serialVersionUID = -4659137688548605095L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4659137688548605095L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "alg...
{ "body": "Map<String, JsonNode> getTree() {\n return tree;\n }", "class_method_signature": "BasicHeader.getTree()", "constructor": false, "full_signature": " Map<String, JsonNode> getTree()", "identifier": "getTree", "invocations": [], "modifiers": "", "parameters": "()", "return": "Map<Str...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_322
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullArrayWhenParsingNonArrayOrTextNode() throws Exception {\n Map<String, JsonNode> tree = new HashMap<>();\n IntNode node = new IntNode(456789);\n tree.put(\"key\", node);\n\n List<String> values = deserializer.getStringOrArray(tree, \"key\");\n ...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java", "identi...
{ "body": "List<String> getStringOrArray(Map<String, JsonNode> tree, String claimName) throws JWTDecodeException {\n JsonNode node = tree.get(claimName);\n if (node == null || node.isNull() || !(node.isArray() || node.isTextual())) {\n return null;\n }\n if (node.isTextual() && ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_26
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetAvailableClaims() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEyMzQ1Njc4OTAsImlhdCI6MTIzNDU2Nzg5MCwibmJmIjoxMjM0NTY3ODkwLCJqdGkiOiJodHRwczovL2p3dC5pby8iLCJhdWQiOiJodHRwczovL2RvbWFpbi5hdXRoMC5jb20iLCJzdWIiOiJsb2dpbi...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public Map<String, Claim> getClaims() {\n return payload.getClaims();\n }", "class_method_signature": "JWTDecoder.getClaims()", "constructor": false, "full_signature": "@Override public Map<String, Claim> getClaims()", "identifier": "getClaims", "invocations": [ "getC...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_267
{ "fields": [ { "declarator": "writer", "modifier": "private", "original_string": "private StringWriter writer;", "type": "StringWriter", "var_name": "writer" }, { "declarator": "serializer", "modifier": "private", "original_string": "private PayloadSerializ...
{ "body": "@Test\n public void shouldSerializeIssuedAtDateInSeconds() throws Exception {\n ClaimsHolder holder = holderFor(\"iat\", new Date(1478874000));\n serializer.serialize(holder, jsonGenerator, serializerProvider);\n jsonGenerator.flush();\n\n assertThat(writer.toString(), is(equ...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadSerializer.java", "identifier": "PayloadSerializer", "interfaces": "", "methods": [ { "class_method_signature": "PayloadSerializer.PayloadSerializer()", "constructor": true, "full_signature": "public PayloadSerializer(...
{ "body": "@Override\n public void serialize(ClaimsHolder holder, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n for (Map.Entry<String, Object> e : holder.getClaims().entrySet()) {\n switch (e.getKey()) {\n case PublicClaim...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_289
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldHaveUnmodifiableTreeWhenInstantiatedWithNullTree() throws Exception {\n exception.expect(UnsupportedOperationException.class);\n BasicHeader header = new BasicHeader(null, null, null, null, null, objectReader);\n header.getTree().put(\"something\", null);\n...
{ "fields": [ { "declarator": "serialVersionUID = -4659137688548605095L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4659137688548605095L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "alg...
{ "body": "Map<String, JsonNode> getTree() {\n return tree;\n }", "class_method_signature": "BasicHeader.getTree()", "constructor": false, "full_signature": " Map<String, JsonNode> getTree()", "identifier": "getTree", "invocations": [], "modifiers": "", "parameters": "()", "return": "Map<Str...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_323
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullDateWhenParsingNullNode() throws Exception {\n Map<String, JsonNode> tree = new HashMap<>();\n NullNode node = NullNode.getInstance();\n tree.put(\"key\", node);\n\n Date date = deserializer.getDateFromSeconds(tree, \"key\");\n assertTh...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java", "identi...
{ "body": "Date getDateFromSeconds(Map<String, JsonNode> tree, String claimName) {\n JsonNode node = tree.get(claimName);\n if (node == null || node.isNull()) {\n return null;\n }\n if (!node.canConvertToLong()) {\n throw new JWTDecodeException(String.format(\"The cla...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_27
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldSplitToken() throws Exception {\n String token = \"eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJpc3MiOiJhdXRoMCJ9.W1mx_Y0hbAMbPmfW9whT605AAcxB7REFuJiDAHk2Sdc\";\n String[] parts = TokenUtils.splitToken(token);\n\n assertThat(parts, is(notNullValue()));\n a...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/TokenUtils.java", "identifier": "TokenUtils", "interfaces": "", "methods": [ { "class_method_signature": "TokenUtils.splitToken(String token)", "constructor": false, "full_signature": "static String[] splitToken(String token)", ...
{ "body": "static String[] splitToken(String token) throws JWTDecodeException {\n String[] parts = token.split(\"\\\\.\");\n if (parts.length == 2 && token.endsWith(\".\")) {\n //Tokens with alg='none' have empty String as Signature.\n parts = new String[]{parts[0], parts[1], \"\"}...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_266
{ "fields": [ { "declarator": "writer", "modifier": "private", "original_string": "private StringWriter writer;", "type": "StringWriter", "var_name": "writer" }, { "declarator": "serializer", "modifier": "private", "original_string": "private PayloadSerializ...
{ "body": "@Test\n public void shouldSerializeNotBeforeDateInSeconds() throws Exception {\n ClaimsHolder holder = holderFor(\"nbf\", new Date(1478874000));\n serializer.serialize(holder, jsonGenerator, serializerProvider);\n jsonGenerator.flush();\n\n assertThat(writer.toString(), is(eq...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadSerializer.java", "identifier": "PayloadSerializer", "interfaces": "", "methods": [ { "class_method_signature": "PayloadSerializer.PayloadSerializer()", "constructor": true, "full_signature": "public PayloadSerializer(...
{ "body": "@Override\n public void serialize(ClaimsHolder holder, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n for (Map.Entry<String, Object> e : holder.getClaims().entrySet()) {\n switch (e.getKey()) {\n case PublicClaim...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_118
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldPassHMAC384Verification() throws Exception {\n String jwt = \"eyJhbGciOiJIUzM4NCIsImN0eSI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.uztpK_wUMYJhrRv8SV-1LU4aPnwl-EM1q-wJnqgyb5DHoDteP6lN_gE1xnZJH5vw\";\n Algorithm algorithmString = Algorithm.HMAC384(\"secret\");\n Algori...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_70
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowECDSA512InstanceWithNullKey() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"Both provided Keys cannot be null.\");\n ECKey key = null;\n Algorithm.ECDSA512(key);\n }", "class_method_signa...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm ECDSA512(ECDSAKeyProvider keyProvider) throws IllegalArgumentException {\n return new ECDSAAlgorithm(\"ES512\", \"SHA512withECDSA\", 66, keyProvider);\n }", "class_method_signature": "Algorithm.ECDSA512(ECDSAKeyProvider keyProvider)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_231
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldGetContentType() throws Exception {\n String token = \"eyJhbGciOiJIUzI1NiIsImN0eSI6ImF3ZXNvbWUifQ.e30.AIm-pJDOaAyct9qKMlN-lQieqNDqc3d4erqUZc5SHAs\";\n DecodedJWT jwt = JWT.require(Algorithm.HMAC256(\"secret\"))\n .build()\n .verify(to...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_66
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowECDSA256InstanceWithNullKeyProvider() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"The Key Provider cannot be null.\");\n ECDSAKeyProvider provider = null;\n Algorithm.ECDSA256(provider);\n ...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm ECDSA256(ECDSAKeyProvider keyProvider) throws IllegalArgumentException {\n return new ECDSAAlgorithm(\"ES256\", \"SHA256withECDSA\", 32, keyProvider);\n }", "class_method_signature": "Algorithm.ECDSA256(ECDSAKeyProvider keyProvider)", "constructor": false, "full_sign...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_89
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldPassRSA512Verification() throws Exception {\n String jwt = \"eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.mvL5LoMyIrWYjk5umEXZTmbyIrkbbcVPUkvdGZbu0qFBxGOf0nXP5PZBvPcOu084lvpwVox5n3VaD4iqzW-PsJyvKFgi5TnwmsbKchAp7JexQEsQOnTSGcfRqeUUiBZqRQdYsho71oAB3T4FnalDdFEp...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_227
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldGetExpirationTime() throws Exception {\n Date expectedDate = new Date(1477592 * 1000);\n Clock clock = mock(Clock.class);\n when(clock.getToday()).thenReturn(expectedDate);\n\n String token = \"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0Nzc1OTJ9.x_ZjkPkKYUV5td...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_159
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldThrowOnECDSA384VerificationWithDERSignatureWithBothKeys() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA384withECDSA\");\n ...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_31
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_RSA = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_RSA = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_K...
{ "body": "@Test\n public void shouldThrowOnNullCustomClaimName() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"The Custom Claim's name can't be null.\");\n JWTCreator.init()\n .withClaim(null, \"value\");\n }", "class_me...
{ "fields": [ { "declarator": "algorithm", "modifier": "private final", "original_string": "private final Algorithm algorithm;", "type": "Algorithm", "var_name": "algorithm" }, { "declarator": "headerJson", "modifier": "private final", "original_string": "pr...
{ "body": "static JWTCreator.Builder init() {\n return new Builder();\n }", "class_method_signature": "JWTCreator.init()", "constructor": false, "full_signature": "static JWTCreator.Builder init()", "identifier": "init", "invocations": [], "modifiers": "static", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_270
{ "fields": [ { "declarator": "writer", "modifier": "private", "original_string": "private StringWriter writer;", "type": "StringWriter", "var_name": "writer" }, { "declarator": "serializer", "modifier": "private", "original_string": "private PayloadSerializ...
{ "body": "@Test\n public void shouldSerializeDatesUsingLong() throws Exception {\n long secs = Integer.MAX_VALUE + 10000L;\n Date date = new Date(secs * 1000L);\n Map<String, Object> claims = new HashMap<String, Object>();\n claims.put(\"iat\", date);\n claims.put(\"nbf\", date)...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadSerializer.java", "identifier": "PayloadSerializer", "interfaces": "", "methods": [ { "class_method_signature": "PayloadSerializer.PayloadSerializer()", "constructor": true, "full_signature": "public PayloadSerializer(...
{ "body": "@Override\n public void serialize(ClaimsHolder holder, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n for (Map.Entry<String, Object> e : holder.getClaims().entrySet()) {\n switch (e.getKey()) {\n case PublicClaim...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_122
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldFailHMAC512VerificationWithInvalidSecretString() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: HmacSHA512\");\n String jwt =...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_175
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA512VerificationOnInvalidJOSESignatureLength() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA512withECDSA\");\n e...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_319
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetEmptyStringArrayWhenParsingEmptyTextNode() throws Exception {\n Map<String, JsonNode> tree = new HashMap<>();\n TextNode textNode = new TextNode(\"\");\n tree.put(\"key\", textNode);\n\n List<String> values = deserializer.getStringOrArray(tree, \"...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java", "identi...
{ "body": "List<String> getStringOrArray(Map<String, JsonNode> tree, String claimName) throws JWTDecodeException {\n JsonNode node = tree.get(claimName);\n if (node == null || node.isNull() || !(node.isArray() || node.isTextual())) {\n return null;\n }\n if (node.isTextual() && ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_163
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA384VerificationWhenUsingPrivateKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA384withECDSA\");\n exception....
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_3
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetPayload() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ\");\n assertThat(jwt, is(notNullValue()));\n assertThat(jwt.getPayload(), is(\"e30\"));\n }", "class_method_signature":...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public String getPayload() {\n return parts[1];\n }", "class_method_signature": "JWTDecoder.getPayload()", "constructor": false, "full_signature": "@Override public String getPayload()", "identifier": "getPayload", "invocations": [], "modifiers": "@Override public", "...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_134
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldBeEqualSignatureMethodResults() throws Exception {\n Algorithm algorithm = Algorithm.HMAC256(\"secret\");\n\n byte[] header = new byte[]{0x00, 0x01, 0x02};\n byte[] payload = new byte[]{0x04, 0x05, 0x06};\n\n ByteArrayOutputStream bout = new ByteArra...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException {\n try {\n return crypto.createSignatureFor(getDescription(), secret, headerBytes, payloadBytes);\n } catch (NoSuchAlgorithmException | InvalidKeyException e) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_285
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldThrowWhenConvertingHeaderFromInvalidJson() throws Exception {\n exception.expect(JWTDecodeException.class);\n exception.expectMessage(\"The string '}{' doesn't have a valid JSON format.\");\n parser.parseHeader(\"}{\");\n }", "class_method_signature": ...
{ "fields": [ { "declarator": "payloadReader", "modifier": "private final", "original_string": "private final ObjectReader payloadReader;", "type": "ObjectReader", "var_name": "payloadReader" }, { "declarator": "headerReader", "modifier": "private final", "o...
{ "body": "@Override\n public Header parseHeader(String json) throws JWTDecodeException {\n if (json == null) {\n throw decodeException();\n }\n\n try {\n return headerReader.readValue(json);\n } catch (IOException e) {\n throw decodeException(json);\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_143
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA256VerificationOnInvalidJOSESignatureLength() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA256withECDSA\");\n e...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_93
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldFailRSA512VerificationWithInvalidPublicKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA512withRSA\");\n String jwt = ...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_114
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldCopyTheReceivedSecretArray() throws Exception {\n String jwt = \"eyJhbGciOiJIUzI1NiIsImN0eSI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.mZ0m_N1J4PgeqWmi903JuUoDRZDBPB7HwkS4nVyWH1M\";\n byte[] secretArray = \"secret\".getBytes(Charset.defaultCharset());\n Algorithm algor...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_85
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldPassRSA384VerificationWithProvidedPublicKey() throws Exception {\n RSAKeyProvider provider = mock(RSAKeyProvider.class);\n PublicKey publicKey = readPublicKeyFromFile(PUBLIC_KEY_FILE, \"RSA\");\n when(provider.getPublicKeyById(\"my-key-id\")).thenReturn((RS...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_102
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldDoRSA384SigningWithProvidedPrivateKey() throws Exception {\n RSAKeyProvider provider = mock(RSAKeyProvider.class);\n PrivateKey privateKey = readPrivateKeyFromFile(PRIVATE_KEY_FILE, \"RSA\");\n PublicKey publicKey = readPublicKeyFromFile(PUBLIC_KEY_FILE, \"...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_293
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetType() throws Exception {\n BasicHeader header = new BasicHeader(null, \"jwt\", null, null, null, objectReader);\n\n assertThat(header, is(notNullValue()));\n assertThat(header.getType(), is(notNullValue()));\n assertThat(header.getType(), is(\"jw...
{ "fields": [ { "declarator": "serialVersionUID = -4659137688548605095L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4659137688548605095L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "alg...
{ "body": "@Override\n public String getType() {\n return type;\n }", "class_method_signature": "BasicHeader.getType()", "constructor": false, "full_signature": "@Override public String getType()", "identifier": "getType", "invocations": [], "modifiers": "@Override public", "parameters": "(...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_155
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA256KVerificationOnInvalidDERSignature() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA256withECDSA\");\n \n ...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_207
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldDecodeAStringToken() throws Exception {\n String token = \"eyJhbGciOiJIUzI1NiIsImN0eSI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.mZ0m_N1J4PgeqWmi903JuUoDRZDBPB7HwkS4nVyWH1M\";\n DecodedJWT jwt = JWT.decode(token);\n\n assertThat(jwt, is(notNullValue()));\n }", "cl...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static DecodedJWT decode(String token) throws JWTDecodeException {\n return new JWTDecoder(token);\n }", "class_method_signature": "JWT.decode(String token)", "constructor": false, "full_signature": "public static DecodedJWT decode(String token)", "identifier": "decode", "invocat...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_46
{ "fields": [ { "declarator": "DATE_TOKEN_MS_VALUE = 1477592 * 1000", "modifier": "private static final", "original_string": "private static final long DATE_TOKEN_MS_VALUE = 1477592 * 1000;", "type": "long", "var_name": "DATE_TOKEN_MS_VALUE" }, { "declarator": "exceptio...
{ "body": "@Test\n public void shouldRemoveClaimWhenPassingNull() throws Exception {\n Algorithm algorithm = mock(Algorithm.class);\n JWTVerifier verifier = JWTVerifier.init(algorithm)\n .withIssuer(\"iss\")\n .withIssuer((String) null)\n .build();\n\n ...
{ "fields": [ { "declarator": "algorithm", "modifier": "private final", "original_string": "private final Algorithm algorithm;", "type": "Algorithm", "var_name": "algorithm" }, { "declarator": "claims", "modifier": "final", "original_string": "final Map<Stri...
{ "body": "static Verification init(Algorithm algorithm) throws IllegalArgumentException {\n return new BaseVerification(algorithm);\n }", "class_method_signature": "JWTVerifier.init(Algorithm algorithm)", "constructor": false, "full_signature": "static Verification init(Algorithm algorithm)", "iden...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_250
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullExpiresAtIfMissing() throws Exception {\n PayloadImpl payload = new PayloadImpl(null, null, null, null, null, null, null, null, objectReader);\n assertThat(payload, is(notNullValue()));\n assertThat(payload.getExpiresAt(), is(nullValue()));\n }", ...
{ "fields": [ { "declarator": "serialVersionUID = 1659021498824562311L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1659021498824562311L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "issue...
{ "body": "@Override\n public Date getExpiresAt() {\n return expiresAt;\n }", "class_method_signature": "PayloadImpl.getExpiresAt()", "constructor": false, "full_signature": "@Override public Date getExpiresAt()", "identifier": "getExpiresAt", "invocations": [], "modifiers": "@Override public...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_11
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetIssuedAt() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0NzY3MjcwODZ9.KPjGoW665E8V5_27Jugab8qSTxLk2cgquhPCBfAP0_w\");\n assertThat(jwt, is(notNullValue()));\n assertThat(jwt.getIssuedAt(), is(instanceOf(Date.class)))...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public Date getIssuedAt() {\n return payload.getIssuedAt();\n }", "class_method_signature": "JWTDecoder.getIssuedAt()", "constructor": false, "full_signature": "@Override public Date getIssuedAt()", "identifier": "getIssuedAt", "invocations": [ "getIssuedAt" ], "m...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_315
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldThrowWhenParsingArrayWithObjectValue() throws Exception {\n exception.expect(JWTDecodeException.class);\n exception.expectMessage(\"Couldn't map the Claim's array contents to String\");\n\n ObjectMapper mapper = new ObjectMapper();\n JsonNode jsonNod...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java", "identi...
{ "body": "List<String> getStringOrArray(Map<String, JsonNode> tree, String claimName) throws JWTDecodeException {\n JsonNode node = tree.get(claimName);\n if (node == null || node.isNull() || !(node.isArray() || node.isTextual())) {\n return null;\n }\n if (node.isTextual() && ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_196
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldThrowOnJOSESignatureConversionIfDoesNotHaveExpectedLength() throws Exception {\n ECDSAAlgorithm algorithm256 = (ECDSAAlgorithm) Algorithm.ECDSA256((ECPublicKey) readPublicKeyFromFile(PUBLIC_KEY_FILE_256, \"EC\"), (ECPrivateKey) readPrivateKeyFromFile(PRIVATE_KEY_FILE_256...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "byte[] JOSEToDER(byte[] joseSignature) throws SignatureException {\n if (joseSignature.length != ecNumberSize * 2) {\n throw new SignatureException(\"Invalid JOSE signature format.\");\n }\n\n // Retrieve R and S number's length and padding.\n int rPadding = countPadd...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_179
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldDoECDSA256SigningWithProvidedPrivateKey() throws Exception {\n ECDSAKeyProvider provider = mock(ECDSAKeyProvider.class);\n PrivateKey privateKey = readPrivateKeyFromFile(PRIVATE_KEY_FILE_256, \"EC\");\n PublicKey publicKey = readPublicKeyFromFile(PUBLIC_KEY...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_246
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullSubjectIfMissing() throws Exception {\n PayloadImpl payload = new PayloadImpl(null, null, null, null, null, null, null, null, objectReader);\n assertThat(payload, is(notNullValue()));\n assertThat(payload.getSubject(), is(nullValue()));\n }", "c...
{ "fields": [ { "declarator": "serialVersionUID = 1659021498824562311L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1659021498824562311L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "issue...
{ "body": "@Override\n public String getSubject() {\n return subject;\n }", "class_method_signature": "PayloadImpl.getSubject()", "constructor": false, "full_signature": "@Override public String getSubject()", "identifier": "getSubject", "invocations": [], "modifiers": "@Override public", "...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_303
{ "fields": [ { "declarator": "claim", "modifier": "private", "original_string": "private NullClaim claim;", "type": "NullClaim", "var_name": "claim" } ], "file": "lib/src/test/java/com/auth0/jwt/impl/NullClaimTest.java", "identifier": "NullClaimTest", "interfaces": "", ...
{ "body": "@Test\n public void shouldBeNull() throws Exception {\n assertThat(claim.isNull(), is(true));\n }", "class_method_signature": "NullClaimTest.shouldBeNull()", "constructor": false, "full_signature": "@Test public void shouldBeNull()", "identifier": "shouldBeNull", "invocations": [ ...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/NullClaim.java", "identifier": "NullClaim", "interfaces": "implements Claim", "methods": [ { "class_method_signature": "NullClaim.isNull()", "constructor": false, "full_signature": "@Override public boolean isNull()", "i...
{ "body": "@Override\n public boolean isNull() {\n return true;\n }", "class_method_signature": "NullClaim.isNull()", "constructor": false, "full_signature": "@Override public boolean isNull()", "identifier": "isNull", "invocations": [], "modifiers": "@Override public", "parameters": "()", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_180
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailOnECDSA256SigningWhenProvidedPrivateKeyIsNull() throws Exception {\n exception.expect(SignatureGenerationException.class);\n exception.expectMessage(\"The Token's Signature couldn't be generated when signing using the Algorithm: SHA256withECDSA\");\n ex...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException {\n try {\n ECPrivateKey privateKey = keyProvider.getPrivateKey();\n if (privateKey == null) {\n throw new IllegalStateException(\"The given Private Key...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_211
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldAcceptNoneAlgorithm() throws Exception {\n String token = \"eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJpc3MiOiJhdXRoMCJ9.\";\n DecodedJWT jwt = JWT.require(Algorithm.none())\n .build()\n .verify(token);\n\n assertThat(jwt, is(notNu...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_50
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowHMAC384InstanceWithNullSecretBytes() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"The Secret cannot be null\");\n byte[] secret = null;\n Algorithm.HMAC384(secret);\n }", "class_method_s...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm HMAC384(String secret) throws IllegalArgumentException {\n return new HMACAlgorithm(\"HS384\", \"HmacSHA384\", secret);\n }", "class_method_signature": "Algorithm.HMAC384(String secret)", "constructor": false, "full_signature": "public static Algorithm HMAC384(String...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_138
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldThrowOnECDSA256VerificationWithDERSignatureWithBothKeys() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA256withECDSA\");\n ...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_133
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldThrowOnSignWhenTheSecretIsInvalid() throws Exception {\n exception.expect(SignatureGenerationException.class);\n exception.expectMessage(\"The Token's Signature couldn't be generated when signing using the Algorithm: some-algorithm\");\n exception.expectCau...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException {\n try {\n return crypto.createSignatureFor(getDescription(), secret, headerBytes, payloadBytes);\n } catch (NoSuchAlgorithmException | InvalidKeyException e) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_308
{ "fields": [ { "declarator": "claim", "modifier": "private", "original_string": "private NullClaim claim;", "type": "NullClaim", "var_name": "claim" } ], "file": "lib/src/test/java/com/auth0/jwt/impl/NullClaimTest.java", "identifier": "NullClaimTest", "interfaces": "", ...
{ "body": "@Test\n public void shouldGetAsString() throws Exception {\n assertThat(claim.asString(), is(nullValue()));\n }", "class_method_signature": "NullClaimTest.shouldGetAsString()", "constructor": false, "full_signature": "@Test public void shouldGetAsString()", "identifier": "shouldGetAsSt...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/NullClaim.java", "identifier": "NullClaim", "interfaces": "implements Claim", "methods": [ { "class_method_signature": "NullClaim.isNull()", "constructor": false, "full_signature": "@Override public boolean isNull()", "i...
{ "body": "@Override\n public String asString() {\n return null;\n }", "class_method_signature": "NullClaim.asString()", "constructor": false, "full_signature": "@Override public String asString()", "identifier": "asString", "invocations": [], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_4
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetSignature() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiJ9.e30.XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5lyQ\");\n assertThat(jwt, is(notNullValue()));\n assertThat(jwt.getSignature(), is(\"XmNK3GpH3Ys_7wsYBfq4C3M6goz71I7dTgUkuIa5l...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public String getSignature() {\n return parts[2];\n }", "class_method_signature": "JWTDecoder.getSignature()", "constructor": false, "full_signature": "@Override public String getSignature()", "identifier": "getSignature", "invocations": [], "modifiers": "@Override publ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_164
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA384VerificationOnInvalidJOSESignatureLength() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA384withECDSA\");\n e...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_172
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA512VerificationWhenProvidedPublicKeyIsNull() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA512withECDSA\");\n ex...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_125
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldThrowOnVerifyWhenTheSecretIsInvalid() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: some-alg\");\n exception.expectCause(isA...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_36
{ "fields": [ { "declarator": "DATE_TOKEN_MS_VALUE = 1477592 * 1000", "modifier": "private static final", "original_string": "private static final long DATE_TOKEN_MS_VALUE = 1477592 * 1000;", "type": "long", "var_name": "DATE_TOKEN_MS_VALUE" }, { "declarator": "exceptio...
{ "body": "@Test\n public void shouldThrowOnInvalidCustomClaimValue() throws Exception {\n exception.expect(InvalidClaimException.class);\n exception.expectMessage(\"The Claim 'name' value doesn't match the required one.\");\n String token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjpbI...
{ "fields": [ { "declarator": "algorithm", "modifier": "private final", "original_string": "private final Algorithm algorithm;", "type": "Algorithm", "var_name": "algorithm" }, { "declarator": "claims", "modifier": "final", "original_string": "final Map<Stri...
{ "body": "@Override\n public DecodedJWT verify(String token) throws JWTVerificationException {\n DecodedJWT jwt = new JWTDecoder(parser, token);\n return verify(jwt);\n }", "class_method_signature": "JWTVerifier.verify(String token)", "constructor": false, "full_signature": "@Override publi...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_298
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullKeyIdIfMissing() throws Exception {\n BasicHeader header = new BasicHeader(null, null, null, null, null, objectReader);\n\n assertThat(header, is(notNullValue()));\n assertThat(header.getKeyId(), is(nullValue()));\n }", "class_method_signature":...
{ "fields": [ { "declarator": "serialVersionUID = -4659137688548605095L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4659137688548605095L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "alg...
{ "body": "@Override\n public String getKeyId() {\n return keyId;\n }", "class_method_signature": "BasicHeader.getKeyId()", "constructor": false, "full_signature": "@Override public String getKeyId()", "identifier": "getKeyId", "invocations": [], "modifiers": "@Override public", "parameters...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_277
{ "fields": [ { "declarator": "writer", "modifier": "private", "original_string": "private StringWriter writer;", "type": "StringWriter", "var_name": "writer" }, { "declarator": "serializer", "modifier": "private", "original_string": "private PayloadSerializ...
{ "body": "@Test\n public void shouldSerializeCustomListOfObject() throws Exception {\n UserPojo user1 = new UserPojo(\"Michael\", 1);\n UserPojo user2 = new UserPojo(\"Lucas\", 2);\n ClaimsHolder holder = holderFor(\"users\", Arrays.asList(user1, user2));\n serializer.serialize(holder,...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadSerializer.java", "identifier": "PayloadSerializer", "interfaces": "", "methods": [ { "class_method_signature": "PayloadSerializer.PayloadSerializer()", "constructor": true, "full_signature": "public PayloadSerializer(...
{ "body": "@Override\n public void serialize(ClaimsHolder holder, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n for (Map.Entry<String, Object> e : holder.getClaims().entrySet()) {\n switch (e.getKey()) {\n case PublicClaim...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_61
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowRSA512InstanceWithNullKey() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"Both provided Keys cannot be null.\");\n RSAKey key = null;\n Algorithm.RSA512(key);\n }", "class_method_signatur...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm RSA512(RSAKeyProvider keyProvider) throws IllegalArgumentException {\n return new RSAAlgorithm(\"RS512\", \"SHA512withRSA\", keyProvider);\n }", "class_method_signature": "Algorithm.RSA512(RSAKeyProvider keyProvider)", "constructor": false, "full_signature": "public ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_220
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldAcceptECDSA512Algorithm() throws Exception {\n String token = \"eyJhbGciOiJFUzUxMiJ9.eyJpc3MiOiJhdXRoMCJ9.AeCJPDIsSHhwRSGZCY6rspi8zekOw0K9qYMNridP1Fu9uhrA1QrG-EUxXlE06yvmh2R7Rz0aE7kxBwrnq8L8aOBCAYAsqhzPeUvyp8fXjjgs0Eto5I0mndE2QHlgcMSFASyjHbU8wD2Rq7ZNzGQ5b2MZfpv030WGUajT-...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_109
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldFailOnRSA512SigningWhenUsingPublicKey() throws Exception {\n exception.expect(SignatureGenerationException.class);\n exception.expectMessage(\"The Token's Signature couldn't be generated when signing using the Algorithm: SHA512withRSA\");\n exception.expect...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n @Deprecated\n public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException {\n try {\n RSAPrivateKey privateKey = keyProvider.getPrivateKey();\n if (privateKey == null) {\n throw new IllegalStateException(\"The...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_77
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldPassRSA256Verification() throws Exception {\n String jwt = \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.dxXF3MdsyW-AuvwJpaQtrZ33fAde9xWxpLIg9cO2tMLH2GSRNuLAe61KsJusZhqZB9Iy7DvflcmRz-9OZndm6cj_ThGeJH2LLc90K83UEvvRPo8l85RrQb8PcanxCgIs2RcZOLygERizB3pr5icGkzR7...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_236
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldThrowOnNullTree() throws Exception {\n exception.expect(JWTDecodeException.class);\n exception.expectMessage(\"Parsing the Header's JSON resulted on a Null map\");\n\n JsonDeserializer deserializer = new HeaderDeserializer(objectReader);\n JsonParser...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/HeaderDeserializer.java", "identif...
{ "body": "@Override\n public BasicHeader deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {\n Map<String, JsonNode> tree = p.getCodec().readValue(p, new TypeReference<Map<String, JsonNode>>() {\n });\n if (tree == null) {\n throw new JWTDecodeException(\"Pa...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_98
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldFailOnRSA256SigningWhenProvidedPrivateKeyIsNull() throws Exception {\n exception.expect(SignatureGenerationException.class);\n exception.expectMessage(\"The Token's Signature couldn't be generated when signing using the Algorithm: SHA256withRSA\");\n except...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n @Deprecated\n public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException {\n try {\n RSAPrivateKey privateKey = keyProvider.getPrivateKey();\n if (privateKey == null) {\n throw new IllegalStateException(\"The...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_20
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetCustomClaimOfTypeDouble() throws Exception {\n String token = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoyMy40NX0.7pyX2OmEGaU9q15T8bGFqRm-d3RVTYnqmZNZtxMKSlA\";\n DecodedJWT jwt = JWT.decode(token);\n Assert.assertThat(jwt, is(notNullValue()));\n ...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public Claim getClaim(String name) {\n return payload.getClaim(name);\n }", "class_method_signature": "JWTDecoder.getClaim(String name)", "constructor": false, "full_signature": "@Override public Claim getClaim(String name)", "identifier": "getClaim", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_324
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullDateWhenParsingNull() throws Exception {\n Map<String, JsonNode> tree = new HashMap<>();\n tree.put(\"key\", null);\n\n Date date = deserializer.getDateFromSeconds(tree, \"key\");\n assertThat(date, is(nullValue()));\n }", "class_method_s...
{ "fields": [ { "declarator": "objectReader", "modifier": "private final", "original_string": "private final ObjectReader objectReader;", "type": "ObjectReader", "var_name": "objectReader" } ], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadDeserializer.java", "identi...
{ "body": "Date getDateFromSeconds(Map<String, JsonNode> tree, String claimName) {\n JsonNode node = tree.get(claimName);\n if (node == null || node.isNull()) {\n return null;\n }\n if (!node.canConvertToLong()) {\n throw new JWTDecodeException(String.format(\"The cla...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_261
{ "fields": [ { "declarator": "writer", "modifier": "private", "original_string": "private StringWriter writer;", "type": "StringWriter", "var_name": "writer" }, { "declarator": "serializer", "modifier": "private", "original_string": "private PayloadSerializ...
{ "body": "@SuppressWarnings(\"Convert2Diamond\")\n @Test\n public void shouldSerializeEmptyMap() throws Exception {\n ClaimsHolder holder = new ClaimsHolder(new HashMap<String, Object>());\n serializer.serialize(holder, jsonGenerator, serializerProvider);\n jsonGenerator.flush();\n\n ...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/PayloadSerializer.java", "identifier": "PayloadSerializer", "interfaces": "", "methods": [ { "class_method_signature": "PayloadSerializer.PayloadSerializer()", "constructor": true, "full_signature": "public PayloadSerializer(...
{ "body": "@Override\n public void serialize(ClaimsHolder holder, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n for (Map.Entry<String, Object> e : holder.getClaims().entrySet()) {\n switch (e.getKey()) {\n case PublicClaim...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_148
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldPassECDSA256KVerificationWithJOSESignatureWithBothKeys() throws Exception {\n Algorithm algorithm = Algorithm.ECDSA256K((ECPublicKey) readPublicKeyFromFile(PUBLIC_KEY_FILE_256K, \"EC\")\n , (ECPrivateKey) readPrivateKeyFromFile(PRIVATE_KEY_FILE_256K, \"EC\...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_216
{ "fields": [ { "declarator": "PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_KEY_FILE_RSA = \"src/test/resources/rsa-public.pem\";", "type": "String", "var_name": "PUBLIC_KEY_FI...
{ "body": "@Test\n public void shouldAcceptRSA384Algorithm() throws Exception {\n String token = \"eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhdXRoMCJ9.TZlWjXObwGSQOiu2oMq8kiKz0_BR7bbBddNL6G8eZ_GoR82BXOZDqNrQr7lb_M-78XGBguWLWNIdYhzgxOUL9EoCJlrqVm9s9vo6G8T1sj1op-4TbjXZ61TwIvrJee9BvPLdKUJ9_fp1Js5kl6yXkst...
{ "fields": [ { "declarator": "parser", "modifier": "private final", "original_string": "private final JWTParser parser;", "type": "JWTParser", "var_name": "parser" } ], "file": "lib/src/main/java/com/auth0/jwt/JWT.java", "identifier": "JWT", "interfaces": "", "methods"...
{ "body": "public static Verification require(Algorithm algorithm) {\n return JWTVerifier.init(algorithm);\n }", "class_method_signature": "JWT.require(Algorithm algorithm)", "constructor": false, "full_signature": "public static Verification require(Algorithm algorithm)", "identifier": "require", ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_57
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldThrowRSA256InstanceWithNullKeyProvider() throws Exception {\n exception.expect(IllegalArgumentException.class);\n exception.expectMessage(\"The Key Provider cannot be null.\");\n RSAKeyProvider provider = null;\n Algorithm.RSA256(provider);\n }", ...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "description", "modifier": "private final", "original_string": "private final String d...
{ "body": "public static Algorithm RSA256(RSAKeyProvider keyProvider) throws IllegalArgumentException {\n return new RSAAlgorithm(\"RS256\", \"SHA256withRSA\", keyProvider);\n }", "class_method_signature": "Algorithm.RSA256(RSAKeyProvider keyProvider)", "constructor": false, "full_signature": "public ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_187
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldDoECDSA512Signing() throws Exception {\n Algorithm algorithmSign = Algorithm.ECDSA512((ECKey) readPrivateKeyFromFile(PRIVATE_KEY_FILE_512, \"EC\"));\n Algorithm algorithmVerify = Algorithm.ECDSA512((ECKey) readPublicKeyFromFile(PUBLIC_KEY_FILE_512, \"EC\"));\n\n ...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_168
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldThrowOnECDSA512VerificationWithDERSignature() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA512withECDSA\");\n exception....
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_8
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetStringAudience() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJKYWNrIFJleWVzIn0.a4I9BBhPt1OB1GW67g2P1bEHgi6zgOjGUL4LvhE9Dgc\");\n assertThat(jwt, is(notNullValue()));\n assertThat(jwt.getAudience(), is(IsCollectionWit...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public List<String> getAudience() {\n return payload.getAudience();\n }", "class_method_signature": "JWTDecoder.getAudience()", "constructor": false, "full_signature": "@Override public List<String> getAudience()", "identifier": "getAudience", "invocations": [ "getAud...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_241
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@SuppressWarnings(\"Convert2Diamond\")\n @Test\n public void shouldHaveUnmodifiableTree() throws Exception {\n exception.expect(UnsupportedOperationException.class);\n PayloadImpl payload = new PayloadImpl(null, null, null, null, null, null, null, new HashMap<String, JsonNode>(), object...
{ "fields": [ { "declarator": "serialVersionUID = 1659021498824562311L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1659021498824562311L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "issue...
{ "body": "Map<String, JsonNode> getTree() {\n return tree;\n }", "class_method_signature": "PayloadImpl.getTree()", "constructor": false, "full_signature": " Map<String, JsonNode> getTree()", "identifier": "getTree", "invocations": [], "modifiers": "", "parameters": "()", "return": "Map<Str...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_304
{ "fields": [ { "declarator": "claim", "modifier": "private", "original_string": "private NullClaim claim;", "type": "NullClaim", "var_name": "claim" } ], "file": "lib/src/test/java/com/auth0/jwt/impl/NullClaimTest.java", "identifier": "NullClaimTest", "interfaces": "", ...
{ "body": "@Test\n public void shouldGetAsBoolean() throws Exception {\n assertThat(claim.asBoolean(), is(nullValue()));\n }", "class_method_signature": "NullClaimTest.shouldGetAsBoolean()", "constructor": false, "full_signature": "@Test public void shouldGetAsBoolean()", "identifier": "shouldGet...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/NullClaim.java", "identifier": "NullClaim", "interfaces": "implements Claim", "methods": [ { "class_method_signature": "NullClaim.isNull()", "constructor": false, "full_signature": "@Override public boolean isNull()", "i...
{ "body": "@Override\n public Boolean asBoolean() {\n return null;\n }", "class_method_signature": "NullClaim.asBoolean()", "constructor": false, "full_signature": "@Override public Boolean asBoolean()", "identifier": "asBoolean", "invocations": [], "modifiers": "@Override public", "paramet...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_191
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailOnECDSA512SigningWhenUsingPublicKey() throws Exception {\n exception.expect(SignatureGenerationException.class);\n exception.expectMessage(\"The Token's Signature couldn't be generated when signing using the Algorithm: SHA512withECDSA\");\n exception.ex...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException {\n try {\n ECPrivateKey privateKey = keyProvider.getPrivateKey();\n if (privateKey == null) {\n throw new IllegalStateException(\"The given Private Key...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_257
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetExtraClaim() throws Exception {\n assertThat(payload, is(notNullValue()));\n assertThat(payload.getClaim(\"extraClaim\"), is(instanceOf(JsonNodeClaim.class)));\n assertThat(payload.getClaim(\"extraClaim\").asString(), is(\"extraValue\"));\n }", "cla...
{ "fields": [ { "declarator": "serialVersionUID = 1659021498824562311L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1659021498824562311L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "issue...
{ "body": "@Override\n public Claim getClaim(String name) {\n return extractClaim(name, tree, objectReader);\n }", "class_method_signature": "PayloadImpl.getClaim(String name)", "constructor": false, "full_signature": "@Override public Claim getClaim(String name)", "identifier": "getClaim", "in...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_312
{ "fields": [ { "declarator": "claim", "modifier": "private", "original_string": "private NullClaim claim;", "type": "NullClaim", "var_name": "claim" } ], "file": "lib/src/test/java/com/auth0/jwt/impl/NullClaimTest.java", "identifier": "NullClaimTest", "interfaces": "", ...
{ "body": "@Test\n public void shouldGetAsMap() throws Exception {\n assertThat(claim.asMap(), is(nullValue()));\n }", "class_method_signature": "NullClaimTest.shouldGetAsMap()", "constructor": false, "full_signature": "@Test public void shouldGetAsMap()", "identifier": "shouldGetAsMap", "invoc...
{ "fields": [], "file": "lib/src/main/java/com/auth0/jwt/impl/NullClaim.java", "identifier": "NullClaim", "interfaces": "implements Claim", "methods": [ { "class_method_signature": "NullClaim.isNull()", "constructor": false, "full_signature": "@Override public boolean isNull()", "i...
{ "body": "@Override\n public Map<String, Object> asMap() throws JWTDecodeException {\n return null;\n }", "class_method_signature": "NullClaim.asMap()", "constructor": false, "full_signature": "@Override public Map<String, Object> asMap()", "identifier": "asMap", "invocations": [], "modifier...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_16
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "lib/src/te...
{ "body": "@Test\n public void shouldGetMissingClaimIfClaimDoesNotExist() throws Exception {\n DecodedJWT jwt = JWT.decode(\"eyJhbGciOiJIUzI1NiJ9.e30.K17vlwhE8FCMShdl1_65jEYqsQqBOVMPUU9IgG-QlTM\");\n assertThat(jwt, is(notNullValue()));\n assertThat(jwt.getClaim(\"notExisting\"), is(notNullVal...
{ "fields": [ { "declarator": "serialVersionUID = 1873362438023312895L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1873362438023312895L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "parts...
{ "body": "@Override\n public Claim getClaim(String name) {\n return payload.getClaim(name);\n }", "class_method_signature": "JWTDecoder.getClaim(String name)", "constructor": false, "full_signature": "@Override public Claim getClaim(String name)", "identifier": "getClaim", "invocations": [ ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_129
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldDoHMAC256SigningWithString() throws Exception {\n Algorithm algorithm = Algorithm.HMAC256(\"secret\");\n\n String jwt = asJWT(algorithm, HS256Header, auth0IssPayload);\n String expectedSignature = \"s69x7Mmu4JqwmdxiK6sesALO7tcedbFsKEEITUxw9ho\";\n\n ...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n boolean valid = crypto.verifySignatureFor(getDescription(), secret, jwt.getHeader(), jwt.getPayload(), signatureB...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_200
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldDecodeECDSA256JOSE() throws Exception {\n ECDSAAlgorithm algorithm256 = (ECDSAAlgorithm) Algorithm.ECDSA256((ECPublicKey) readPublicKeyFromFile(PUBLIC_KEY_FILE_256, \"EC\"), (ECPrivateKey) readPrivateKeyFromFile(PRIVATE_KEY_FILE_256, \"EC\"));\n\n //Without paddin...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "byte[] JOSEToDER(byte[] joseSignature) throws SignatureException {\n if (joseSignature.length != ecNumberSize * 2) {\n throw new SignatureException(\"Invalid JOSE signature format.\");\n }\n\n // Retrieve R and S number's length and padding.\n int rPadding = countPadd...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_41
{ "fields": [ { "declarator": "DATE_TOKEN_MS_VALUE = 1477592 * 1000", "modifier": "private static final", "original_string": "private static final long DATE_TOKEN_MS_VALUE = 1477592 * 1000;", "type": "long", "var_name": "DATE_TOKEN_MS_VALUE" }, { "declarator": "exceptio...
{ "body": "@SuppressWarnings(\"RedundantCast\")\n @Test\n public void shouldOverrideDefaultNotBeforeLeeway() throws Exception {\n Algorithm algorithm = mock(Algorithm.class);\n JWTVerifier verifier = JWTVerifier.init(algorithm)\n .acceptLeeway(1234L)\n .acceptNotBefor...
{ "fields": [ { "declarator": "algorithm", "modifier": "private final", "original_string": "private final Algorithm algorithm;", "type": "Algorithm", "var_name": "algorithm" }, { "declarator": "claims", "modifier": "final", "original_string": "final Map<Stri...
{ "body": "static Verification init(Algorithm algorithm) throws IllegalArgumentException {\n return new BaseVerification(algorithm);\n }", "class_method_signature": "JWTVerifier.init(Algorithm algorithm)", "constructor": false, "full_signature": "static Verification init(Algorithm algorithm)", "iden...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_152
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE_256 = \"src/test/resources/ec256-key-private.pem\";", "type": "String", "var_name"...
{ "body": "@Test\n public void shouldFailECDSA256KVerificationWhenUsingPrivateKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA256withECDSA\");\n exception...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final ECDSAKeyProvider keyProvider;", "type": "ECDSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "origi...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n ECPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_294
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetNullTypeIfMissing() throws Exception {\n BasicHeader header = new BasicHeader(null, null, null, null, null, objectReader);\n\n assertThat(header, is(notNullValue()));\n assertThat(header.getType(), is(nullValue()));\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "serialVersionUID = -4659137688548605095L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -4659137688548605095L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "alg...
{ "body": "@Override\n public String getType() {\n return type;\n }", "class_method_signature": "BasicHeader.getType()", "constructor": false, "full_signature": "@Override public String getType()", "identifier": "getType", "invocations": [], "modifiers": "@Override public", "parameters": "(...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_105
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldDoRSA512Signing() throws Exception {\n Algorithm algorithmSign = Algorithm.RSA512((RSAKey) readPrivateKeyFromFile(PRIVATE_KEY_FILE, \"RSA\"));\n Algorithm algorithmVerify = Algorithm.RSA512((RSAKey) readPublicKeyFromFile(PUBLIC_KEY_FILE, \"RSA\"));\n\n Stri...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_82
{ "fields": [ { "declarator": "PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\"", "modifier": "private static final", "original_string": "private static final String PRIVATE_KEY_FILE = \"src/test/resources/rsa-private.pem\";", "type": "String", "var_name": "PRIVATE_KEY_FILE"...
{ "body": "@Test\n public void shouldFailRSA256VerificationWhenUsingPrivateKey() throws Exception {\n exception.expect(SignatureVerificationException.class);\n exception.expectMessage(\"The Token's Signature resulted invalid when verified using the Algorithm: SHA256withRSA\");\n exception.expe...
{ "fields": [ { "declarator": "keyProvider", "modifier": "private final", "original_string": "private final RSAKeyProvider keyProvider;", "type": "RSAKeyProvider", "var_name": "keyProvider" }, { "declarator": "crypto", "modifier": "private final", "original_...
{ "body": "@Override\n public void verify(DecodedJWT jwt) throws SignatureVerificationException {\n byte[] signatureBytes = Base64.decodeBase64(jwt.getSignature());\n\n try {\n RSAPublicKey publicKey = keyProvider.getPublicKeyById(jwt.getKeyId());\n if (publicKey == null) {\n ...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }
17517521_113
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator":...
{ "body": "@Test\n public void shouldGetStringBytes() throws Exception {\n String text = \"abcdef123456!@#$%^\";\n byte[] expectedBytes = text.getBytes(\"UTF-8\");\n assertTrue(Arrays.equals(expectedBytes, HMACAlgorithm.getSecretBytes(text)));\n }", "class_method_signature": "HMACAlgorith...
{ "fields": [ { "declarator": "crypto", "modifier": "private final", "original_string": "private final CryptoHelper crypto;", "type": "CryptoHelper", "var_name": "crypto" }, { "declarator": "secret", "modifier": "private final", "original_string": "private f...
{ "body": "static byte[] getSecretBytes(String secret) throws IllegalArgumentException {\n if (secret == null) {\n throw new IllegalArgumentException(\"The Secret cannot be null\");\n }\n return secret.getBytes(StandardCharsets.UTF_8);\n }", "class_method_signature": "HMACAlgorith...
{ "created": null, "fork": null, "fork_count": 691, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17517521, "size": 936, "stargazer_count": 3678, "stars": null, "updates": null, "url": "https://github.com/auth0/java-jwt" }