diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index 1d2efe61e19e2..8101b2d20ee5c 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -971,6 +971,16 @@
quarkus-smallrye-jwt-deployment
${project.version}
+
+ io.quarkus
+ quarkus-smallrye-jwt-build
+ ${project.version}
+
+
+ io.quarkus
+ quarkus-smallrye-jwt-build-deployment
+ ${project.version}
+
io.quarkus
quarkus-smallrye-context-propagation
@@ -2951,6 +2961,14 @@
javax
javaee-api
+
+ javax.annotation
+ javax.annotation-api
+
+
+ io.smallrye
+ smallrye-jwt-build
+
diff --git a/docs/src/main/asciidoc/security-jwt.adoc b/docs/src/main/asciidoc/security-jwt.adoc
index ba0150c20c36f..06da00d62f503 100644
--- a/docs/src/main/asciidoc/security-jwt.adoc
+++ b/docs/src/main/asciidoc/security-jwt.adoc
@@ -34,7 +34,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \
-DprojectArtifactId=security-jwt-quickstart \
-DclassName="org.acme.security.jwt.TokenSecuredResource" \
-Dpath="/secured" \
- -Dextensions="resteasy-jackson, jwt"
+ -Dextensions="resteasy-jackson, smallrye-jwt, smallrye-jwt-build"
cd security-jwt-quickstart
----
@@ -45,7 +45,7 @@ to your project by running the following command in your project base directory:
[source,bash]
----
-./mvnw quarkus:add-extension -Dextensions="smallrye-jwt"
+./mvnw quarkus:add-extension -Dextensions="smallrye-jwt, smallrye-jwt-build"
----
This will add the following to your `pom.xml`:
@@ -56,6 +56,10 @@ This will add the following to your `pom.xml`:
io.quarkus
quarkus-smallrye-jwt
+
+ io.quarkus
+ quarkus-smallrye-jwt-build
+
----
=== Examine the JAX-RS resource
@@ -812,8 +816,8 @@ SmallRye JWT provides an API for securing the JWT claims using all of these opti
[source,xml]
----
- io.smallrye
- smallrye-jwt-build
+ io.quarkus
+ quarkus-smallrye-jwt-build
----
diff --git a/extensions/oidc/deployment/pom.xml b/extensions/oidc/deployment/pom.xml
index 50b7a202f0d86..cdad9e686f7fa 100644
--- a/extensions/oidc/deployment/pom.xml
+++ b/extensions/oidc/deployment/pom.xml
@@ -37,6 +37,10 @@
io.quarkus
quarkus-jackson-deployment
+
+ io.quarkus
+ quarkus-smallrye-jwt-build-deployment
+
io.quarkus
quarkus-security-deployment
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 583982a0fa58b..c07225eab5f54 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
@@ -41,7 +41,6 @@
import io.smallrye.jwt.auth.cdi.CommonJwtProducer;
import io.smallrye.jwt.auth.cdi.JsonValueProducer;
import io.smallrye.jwt.auth.cdi.RawClaimTypeProducer;
-import io.smallrye.jwt.build.impl.JwtProviderImpl;
public class OidcBuildStep {
public static final DotName DOTNAME_SECURITY_EVENT = DotName.createSimple(SecurityEvent.class.getName());
@@ -79,8 +78,6 @@ public void additionalBeans(BuildProducer additionalBea
.addBeanClass(DefaultTenantConfigResolver.class)
.addBeanClass(DefaultTokenStateManager.class);
additionalBeans.produce(builder.build());
-
- reflectiveClasses.produce(new ReflectiveClassBuildItem(true, true, JwtProviderImpl.class));
}
@BuildStep(onlyIf = IsEnabled.class)
diff --git a/extensions/oidc/runtime/pom.xml b/extensions/oidc/runtime/pom.xml
index 55d62151c62da..a815af131be99 100644
--- a/extensions/oidc/runtime/pom.xml
+++ b/extensions/oidc/runtime/pom.xml
@@ -33,15 +33,13 @@
io.quarkus
quarkus-jsonp
+
+ io.quarkus
+ quarkus-smallrye-jwt-build
+
io.smallrye
smallrye-jwt
-
-
- javax.annotation
- javax.annotation-api
-
-
jakarta.annotation
diff --git a/extensions/oidc/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/oidc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index d53da12f82c59..61e35a98dd37a 100644
--- a/extensions/oidc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/extensions/oidc/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -8,4 +8,4 @@ metadata:
guide: "https://quarkus.io/guides/security-openid-connect"
categories:
- "security"
- status: "preview"
+ status: "stable"
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 444c17d9ad8aa..8246166597067 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -129,6 +129,7 @@
elytron-security-ldap
elytron-security-properties-file
elytron-security-oauth2
+ smallrye-jwt-build
smallrye-jwt
oidc
keycloak-authorization
diff --git a/extensions/smallrye-jwt-build/deployment/pom.xml b/extensions/smallrye-jwt-build/deployment/pom.xml
new file mode 100644
index 0000000000000..e49b0839ce356
--- /dev/null
+++ b/extensions/smallrye-jwt-build/deployment/pom.xml
@@ -0,0 +1,54 @@
+
+
+
+ quarkus-smallrye-jwt-build-parent
+ io.quarkus
+ 999-SNAPSHOT
+
+ 4.0.0
+
+ quarkus-smallrye-jwt-build-deployment
+ Quarkus - SmallRye JWT Build - Deployment
+
+
+
+ io.quarkus
+ quarkus-core-deployment
+
+
+ io.quarkus
+ quarkus-smallrye-jwt-build
+
+
+
+
+ io.quarkus
+ quarkus-junit5-internal
+ test
+
+
+ io.rest-assured
+ rest-assured
+ test
+
+
+
+
+
+
+ maven-compiler-plugin
+
+
+
+ io.quarkus
+ quarkus-extension-processor
+ ${project.version}
+
+
+
+
+
+
+
diff --git a/extensions/smallrye-jwt-build/deployment/src/main/java/io/quarkus/smallrye/jwt/builder/deployment/SmallRyeJwtBuildProcessor.java b/extensions/smallrye-jwt-build/deployment/src/main/java/io/quarkus/smallrye/jwt/builder/deployment/SmallRyeJwtBuildProcessor.java
new file mode 100644
index 0000000000000..8bcd0678b7257
--- /dev/null
+++ b/extensions/smallrye-jwt-build/deployment/src/main/java/io/quarkus/smallrye/jwt/builder/deployment/SmallRyeJwtBuildProcessor.java
@@ -0,0 +1,16 @@
+package io.quarkus.smallrye.jwt.builder.deployment;
+
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.smallrye.jwt.algorithm.SignatureAlgorithm;
+import io.smallrye.jwt.build.impl.JwtProviderImpl;
+
+class SmallRyeJwtBuildProcessor {
+
+ @BuildStep
+ void addClassesForReflection(BuildProducer reflectiveClasses) {
+ reflectiveClasses.produce(new ReflectiveClassBuildItem(true, true, SignatureAlgorithm.class));
+ reflectiveClasses.produce(new ReflectiveClassBuildItem(true, true, JwtProviderImpl.class));
+ }
+}
diff --git a/extensions/smallrye-jwt-build/pom.xml b/extensions/smallrye-jwt-build/pom.xml
new file mode 100644
index 0000000000000..423fa273e1308
--- /dev/null
+++ b/extensions/smallrye-jwt-build/pom.xml
@@ -0,0 +1,21 @@
+
+
+
+ quarkus-extensions-parent
+ io.quarkus
+ 999-SNAPSHOT
+ ../pom.xml
+
+ 4.0.0
+
+ quarkus-smallrye-jwt-build-parent
+ Quarkus - SmallRye JWT Token Build
+
+ pom
+
+ deployment
+ runtime
+
+
diff --git a/extensions/smallrye-jwt-build/runtime/pom.xml b/extensions/smallrye-jwt-build/runtime/pom.xml
new file mode 100644
index 0000000000000..bf4f34d6c7806
--- /dev/null
+++ b/extensions/smallrye-jwt-build/runtime/pom.xml
@@ -0,0 +1,47 @@
+
+
+
+ quarkus-smallrye-jwt-build-parent
+ io.quarkus
+ 999-SNAPSHOT
+
+ 4.0.0
+
+ quarkus-smallrye-jwt-build
+ Quarkus - SmallRye JWT Token Build - Runtime
+ Create JSON Web Token with SmallRye JWT Build API
+
+
+
+ io.smallrye
+ smallrye-jwt-build
+
+
+ io.quarkus
+ quarkus-core
+
+
+
+
+
+
+ io.quarkus
+ quarkus-bootstrap-maven-plugin
+
+
+ maven-compiler-plugin
+
+
+
+ io.quarkus
+ quarkus-extension-processor
+ ${project.version}
+
+
+
+
+
+
+
diff --git a/extensions/smallrye-jwt-build/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/smallrye-jwt-build/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000000..d936fa36fa35c
--- /dev/null
+++ b/extensions/smallrye-jwt-build/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,12 @@
+---
+name: "SmallRye JWT Build"
+metadata:
+ keywords:
+ - "smallrye-jwt"
+ - "smallrye-jwt-build"
+ - "jwt"
+ - "json-web-token"
+ guide: "https://quarkus.io/guides/security-jwt"
+ categories:
+ - "security"
+ status: "stable"
diff --git a/extensions/smallrye-jwt/deployment/pom.xml b/extensions/smallrye-jwt/deployment/pom.xml
index 2f8b7d7d6c8b8..f31e2b320b6e2 100644
--- a/extensions/smallrye-jwt/deployment/pom.xml
+++ b/extensions/smallrye-jwt/deployment/pom.xml
@@ -36,6 +36,11 @@
+
+ io.quarkus
+ quarkus-smallrye-jwt-build-deployment
+ test
+
io.quarkus
quarkus-junit5-internal
diff --git a/extensions/smallrye-jwt/deployment/src/main/java/io/quarkus/smallrye/jwt/deployment/SmallRyeJwtProcessor.java b/extensions/smallrye-jwt/deployment/src/main/java/io/quarkus/smallrye/jwt/deployment/SmallRyeJwtProcessor.java
index 70a4f86972b04..25992caad3eea 100644
--- a/extensions/smallrye-jwt/deployment/src/main/java/io/quarkus/smallrye/jwt/deployment/SmallRyeJwtProcessor.java
+++ b/extensions/smallrye-jwt/deployment/src/main/java/io/quarkus/smallrye/jwt/deployment/SmallRyeJwtProcessor.java
@@ -35,14 +35,12 @@
import io.quarkus.smallrye.jwt.runtime.auth.JwtPrincipalProducer;
import io.quarkus.smallrye.jwt.runtime.auth.MpJwtValidator;
import io.quarkus.smallrye.jwt.runtime.auth.RawOptionalClaimCreator;
-import io.smallrye.jwt.algorithm.SignatureAlgorithm;
import io.smallrye.jwt.auth.cdi.ClaimValueProducer;
import io.smallrye.jwt.auth.cdi.CommonJwtProducer;
import io.smallrye.jwt.auth.cdi.JWTCallerPrincipalFactoryProducer;
import io.smallrye.jwt.auth.cdi.JsonValueProducer;
import io.smallrye.jwt.auth.cdi.RawClaimTypeProducer;
import io.smallrye.jwt.auth.principal.DefaultJWTParser;
-import io.smallrye.jwt.build.impl.JwtProviderImpl;
import io.smallrye.jwt.config.JWTAuthContextInfoProvider;
/**
@@ -87,9 +85,6 @@ void registerAdditionalBeans(BuildProducer additionalBe
removable.addBeanClass(JWTCallerPrincipalFactoryProducer.class);
removable.addBeanClass(Claim.class);
additionalBeans.produce(removable.build());
-
- reflectiveClasses.produce(new ReflectiveClassBuildItem(true, true, SignatureAlgorithm.class));
- reflectiveClasses.produce(new ReflectiveClassBuildItem(true, true, JwtProviderImpl.class));
}
/**
diff --git a/extensions/smallrye-jwt/runtime/pom.xml b/extensions/smallrye-jwt/runtime/pom.xml
index adc2489d4ff22..4034fdd1c7f68 100644
--- a/extensions/smallrye-jwt/runtime/pom.xml
+++ b/extensions/smallrye-jwt/runtime/pom.xml
@@ -17,12 +17,6 @@
io.smallrye
smallrye-jwt
-
-
- javax.annotation
- javax.annotation-api
-
-
jakarta.annotation
diff --git a/integration-tests/oidc-code-flow/pom.xml b/integration-tests/oidc-code-flow/pom.xml
index 6f887bdfe3ff6..b5b06edf96df3 100644
--- a/integration-tests/oidc-code-flow/pom.xml
+++ b/integration-tests/oidc-code-flow/pom.xml
@@ -22,6 +22,10 @@
io.quarkus
quarkus-oidc
+
+ io.quarkus
+ quarkus-smallrye-jwt-build
+
io.quarkus
quarkus-resteasy-jackson
@@ -81,6 +85,19 @@
+
+ io.quarkus
+ quarkus-smallrye-jwt-build-deployment
+ ${project.version}
+ pom
+ test
+
+
+ *
+ *
+
+
+
io.quarkus
quarkus-resteasy-jackson-deployment
diff --git a/integration-tests/oidc-tenancy/pom.xml b/integration-tests/oidc-tenancy/pom.xml
index 9436c126bbc60..4d3e7a260784d 100644
--- a/integration-tests/oidc-tenancy/pom.xml
+++ b/integration-tests/oidc-tenancy/pom.xml
@@ -22,6 +22,10 @@
io.quarkus
quarkus-oidc
+
+ io.quarkus
+ quarkus-smallrye-jwt-build
+
io.quarkus
quarkus-resteasy-jackson
@@ -58,6 +62,19 @@
+
+ io.quarkus
+ quarkus-smallrye-jwt-build-deployment
+ ${project.version}
+ pom
+ test
+
+
+ *
+ *
+
+
+
io.quarkus
quarkus-oidc-deployment