diff --git a/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/OidcBuildStep.java b/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/OidcBuildStep.java index bb36bf384588c..2f845b3e6fa59 100644 --- a/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/OidcBuildStep.java +++ b/extensions/oidc/deployment/src/main/java/io/quarkus/oidc/deployment/OidcBuildStep.java @@ -64,6 +64,7 @@ import io.quarkus.oidc.runtime.DefaultTenantConfigResolver; import io.quarkus.oidc.runtime.DefaultTokenIntrospectionUserInfoCache; import io.quarkus.oidc.runtime.DefaultTokenStateManager; +import io.quarkus.oidc.runtime.Jose4jRecorder; import io.quarkus.oidc.runtime.OidcAuthenticationMechanism; import io.quarkus.oidc.runtime.OidcConfig; import io.quarkus.oidc.runtime.OidcConfigurationMetadataProducer; @@ -139,6 +140,12 @@ public void additionalBeans(BuildProducer additionalBea additionalBeans.produce(builder.build()); } + @BuildStep + @Record(ExecutionTime.STATIC_INIT) + public void initJose4J(Jose4jRecorder recorder) { + recorder.initialize(); + } + @BuildStep(onlyIf = IsCacheEnabled.class) @Record(ExecutionTime.RUNTIME_INIT) public SyntheticBeanBuildItem addDefaultCacheBean(OidcConfig config, diff --git a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/Jose4jRecorder.java b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/Jose4jRecorder.java new file mode 100644 index 0000000000000..53dd238c9c7f0 --- /dev/null +++ b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/Jose4jRecorder.java @@ -0,0 +1,14 @@ +package io.quarkus.oidc.runtime; + +import org.jose4j.jwa.AlgorithmFactoryFactory; + +import io.quarkus.runtime.annotations.Recorder; + +@Recorder +public class Jose4jRecorder { + + public void initialize() { + AlgorithmFactoryFactory.getInstance(); + } + +}