Skip to content

Commit

Permalink
Merge pull request quarkusio#16502 from sberyozkin/quarkus_oidc_nativ…
Browse files Browse the repository at this point in the history
…e_enable_https

Update quarkus-oidc and quarkus-oidc-client to enable SSL in Native
  • Loading branch information
sberyozkin authored Apr 14, 2021
2 parents 2cb3c8a + a034688 commit 6b7e402
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.ApplicationArchivesBuildItem;
import io.quarkus.deployment.builditem.EnableAllSecurityServicesBuildItem;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.gizmo.ClassCreator;
Expand Down Expand Up @@ -58,6 +59,11 @@ EnableAllSecurityServicesBuildItem security() {
return new EnableAllSecurityServicesBuildItem();
}

@BuildStep(onlyIf = IsEnabled.class)
ExtensionSslNativeSupportBuildItem enableSslInNative() {
return new ExtensionSslNativeSupportBuildItem(Feature.OIDC_CLIENT);
}

@BuildStep(onlyIf = IsEnabled.class)
void registerProvider(BuildProducer<AdditionalBeanBuildItem> additionalBeans) {
additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(TokensProducer.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.EnableAllSecurityServicesBuildItem;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.oidc.SecurityEvent;
Expand Down Expand Up @@ -85,6 +86,11 @@ EnableAllSecurityServicesBuildItem security() {
return new EnableAllSecurityServicesBuildItem();
}

@BuildStep(onlyIf = IsEnabled.class)
ExtensionSslNativeSupportBuildItem enableSslInNative() {
return new ExtensionSslNativeSupportBuildItem(Feature.OIDC);
}

@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep(onlyIf = IsEnabled.class)
public SyntheticBeanBuildItem setup(
Expand Down
13 changes: 0 additions & 13 deletions integration-tests/oidc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,6 @@
</build>
</profile>

<profile>
<id>native-image</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<!-- add some custom config, the rest comes from parent -->
<properties>
<quarkus.native.enable-https-url-handler>true</quarkus.native.enable-https-url-handler>
</properties>
</profile>

</profiles>

</project>

0 comments on commit 6b7e402

Please sign in to comment.