Support BouncyCastleFipsProvider
onyas opened this issue · 4 comments
Is your feature request related to a problem? Please describe.
in our project, we need BouncyCastleFipsProvider
which is in the lib implementation 'org.bouncycastle:bc-fips'
, but it look like jjwt currently does not support this lib, because in the class RuntimeEnvironment
, it has the fixed class nameprivate static final String BC_PROVIDER_CLASS_NAME = "org.bouncycastle.jce.provider.BouncyCastleProvider";
Describe the solution you'd like
please provide a way to support customized providers, or jjwt already supports this but I don't know.
JJWT doesn't currently instantiate BouncyCastleFipsProvider
, but you can always specify it via the .provider
method on the JwtBuilder
and JwtParserBuilder
. Have you tried that in the meantime?
Also, starting with 0.12.0
, RuntimeEnvironment
is no longer used anywhere in JJWT's codebase - it was deprecated. The Providers
class in the impl
module replaced it.
We'll try to see if we can fallback dynamically instantiating BouncyCastleFipsProvider
if BouncyCastleProvider
isn't in the classpath. Does that sound like a viable solution? Would it ever be realistic that both would be in the classpath?
Thank you for the suggestion. It works.