-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d55e97
commit da36f3f
Showing
25 changed files
with
1,414 additions
and
667 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>quarkus-devservices-parent</artifactId> | ||
<groupId>io.quarkus</groupId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>quarkus-devservices-oidc</artifactId> | ||
<name>Quarkus - DevServices - OIDC</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-core-deployment</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-devservices-common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.smallrye.reactive</groupId> | ||
<artifactId>smallrye-mutiny-vertx-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.smallrye</groupId> | ||
<artifactId>smallrye-jwt-build</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>default-compile</id> | ||
<configuration> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-extension-processor</artifactId> | ||
<version>${project.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
...ons/devservices/oidc/src/main/java/io/quarkus/devservices/oidc/OidcDevServicesConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.quarkus.devservices.oidc; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocDefault; | ||
import io.quarkus.runtime.annotations.ConfigDocMapKey; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
/** | ||
* OpenID Connect Dev Services configuration. | ||
*/ | ||
@ConfigRoot | ||
@ConfigMapping(prefix = "quarkus.oidc.devservices") | ||
public interface OidcDevServicesConfig { | ||
|
||
/** | ||
* Use OpenID Connect Dev Services instead of Keycloak. | ||
*/ | ||
@ConfigDocDefault("Enabled when Docker and Podman are not available") | ||
Optional<Boolean> enabled(); | ||
|
||
/** | ||
* A map of roles for OIDC identity provider users. | ||
* <p> | ||
* If empty, default roles are assigned: `alice` receives `admin` and `user` roles, while other users receive | ||
* `user` role. | ||
* This map is used for role creation when no realm file is found at the `realm-path`. | ||
*/ | ||
@ConfigDocMapKey("role-name") | ||
Map<String, List<String>> roles(); | ||
|
||
} |
10 changes: 7 additions & 3 deletions
10
...ightweightDevServicesConfigBuildItem.java → .../oidc/OidcDevServicesConfigBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
package io.quarkus.oidc.deployment.devservices.keycloak; | ||
package io.quarkus.devservices.oidc; | ||
|
||
import java.util.Map; | ||
|
||
import io.quarkus.builder.item.SimpleBuildItem; | ||
|
||
public final class LightweightDevServicesConfigBuildItem extends SimpleBuildItem { | ||
/** | ||
* OIDC Dev Services configuration properties. | ||
*/ | ||
public final class OidcDevServicesConfigBuildItem extends SimpleBuildItem { | ||
|
||
private final Map<String, String> config; | ||
|
||
public LightweightDevServicesConfigBuildItem(Map<String, String> config) { | ||
OidcDevServicesConfigBuildItem(Map<String, String> config) { | ||
this.config = config; | ||
} | ||
|
||
public Map<String, String> getConfig() { | ||
return config; | ||
} | ||
|
||
} |
Oops, something went wrong.