Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add properties for graalvm #971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Args = -H:ReflectionConfigurationResources=${.}/reflect-config.json -H:ResourceConfigurationResources=${.}/resource-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thoughts on generating this list at build time?
This is going to be difficult to maintain and track if/when these method signatures change.

Any ideas on creating a test harness? (Extra points if it doesn't require slowly creating a native image in order to test it).

Copy link
Author

@XenoAmess XenoAmess Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as for generating I have no idea either, maybe I have to make another maven-plugin for it.
for test, unfortunatly I have no idea how to make it test native fastly.
the native image building is...well, slow.

{
"name": "io.jsonwebtoken.impl.compression.GzipCompressionCodec",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.compression.DeflateCompressionCodec",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.StandardEncryptionAlgorithms",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.StandardSecureDigestAlgorithms",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.StandardKeyAlgorithms",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.io.StandardCompressionAlgorithms",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.DefaultJwtHeaderBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.DefaultClaimsBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.DefaultJwtBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.DefaultJwtParserBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.JwksBridge",
"methods": [
{
"name": "<init>",
"parameterTypes": []
},
{
"name": "UNSAFE_JSON",
"parameterTypes": [
"io.jsonwebtoken.security.Jwk"
]
}
]
},
{
"name": "io.jsonwebtoken.impl.security.DefaultDynamicJwkBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.DefaultJwkParserBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.DefaultJwkSetBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.DefaultJwkSetParserBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.StandardCurves",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.StandardHashAlgorithms",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.StandardKeyOperations",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.DefaultKeyOperationBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.DefaultKeyOperationPolicyBuilder",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "io.jsonwebtoken.impl.security.KeysBridge",
"methods": [
{
"name": "<init>",
"parameterTypes": []
},
{
"name": "password",
"parameterTypes": ["char[]"]
},
{
"name": "builder",
"parameterTypes": ["javax.crypto.SecretKey"]
},
{
"name": "builder",
"parameterTypes": ["java.security.PrivateKey"]
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"resources": {
"includes": [
{
"pattern": "META-INF/services/io.jsonwebtoken.CompressionCodec"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a handful of services, though these should possibly live in their corresponding module, and not in jjwt-api, thoughts?

./impl/src/main/resources/META-INF/services/io.jsonwebtoken.CompressionCodec
./extensions/gson/src/main/resources/META-INF/services/io.jsonwebtoken.io.Serializer
./extensions/gson/src/main/resources/META-INF/services/io.jsonwebtoken.io.Deserializer
./extensions/orgjson/src/main/resources/META-INF/services/io.jsonwebtoken.io.Serializer
./extensions/orgjson/src/main/resources/META-INF/services/io.jsonwebtoken.io.Deserializer
./extensions/jackson/src/main/resources/META-INF/services/io.jsonwebtoken.io.Serializer
./extensions/jackson/src/main/resources/META-INF/services/io.jsonwebtoken.io.Deserializer

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it all in -api for maintaner to maintain them easier, no need to worry about what modification shall look for which json
but yes, logically it should be split into each module

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to try to write a maven-plugin to auto-generate it, so the two problems shall both be solved.

}
]
}
}