forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#44140 from michalvavrik/feature/migrate-…
…oidc-config-classes-to-configmapping Migrate OIDC, OIDC client and OIDC Client Registration extensions to @ConfigMapping
- Loading branch information
Showing
51 changed files
with
4,505 additions
and
401 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
10 changes: 6 additions & 4 deletions
10
...io/quarkus/oidc/client/registration/deployment/OidcClientRegistrationBuildTimeConfig.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,16 +1,18 @@ | ||
package io.quarkus.oidc.client.registration.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
|
||
/** | ||
* Build time configuration for OIDC client registration. | ||
*/ | ||
@ConfigMapping(prefix = "quarkus.oidc-client-registration") | ||
@ConfigRoot | ||
public class OidcClientRegistrationBuildTimeConfig { | ||
public interface OidcClientRegistrationBuildTimeConfig { | ||
/** | ||
* If the OIDC client registration extension is enabled. | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean enabled; | ||
@WithDefault("true") | ||
boolean enabled(); | ||
} |
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
65 changes: 65 additions & 0 deletions
65
...c/main/java/io/quarkus/oidc/client/registration/runtime/OidcClientRegistrationConfig.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,65 @@ | ||
package io.quarkus.oidc.client.registration.runtime; | ||
|
||
import java.util.Map; | ||
import java.util.Optional; | ||
|
||
import io.quarkus.oidc.common.runtime.config.OidcCommonConfig; | ||
import io.smallrye.config.WithDefault; | ||
|
||
//https://datatracker.ietf.org/doc/html/rfc7592 | ||
//https://openid.net/specs/openid-connect-registration-1_0.html | ||
|
||
public interface OidcClientRegistrationConfig extends OidcCommonConfig { | ||
|
||
/** | ||
* OIDC Client Registration id | ||
*/ | ||
Optional<String> id(); | ||
|
||
/** | ||
* If this client registration configuration is enabled. | ||
*/ | ||
@WithDefault("true") | ||
boolean registrationEnabled(); | ||
|
||
/** | ||
* If the client configured with {@link #metadata} must be registered at startup. | ||
*/ | ||
@WithDefault("true") | ||
boolean registerEarly(); | ||
|
||
/** | ||
* Initial access token | ||
*/ | ||
Optional<String> initialToken(); | ||
|
||
/** | ||
* Client metadata | ||
*/ | ||
Metadata metadata(); | ||
|
||
/** | ||
* Client metadata | ||
*/ | ||
interface Metadata { | ||
/** | ||
* Client name | ||
*/ | ||
Optional<String> clientName(); | ||
|
||
/** | ||
* Redirect URI | ||
*/ | ||
Optional<String> redirectUri(); | ||
|
||
/** | ||
* Post Logout URI | ||
*/ | ||
Optional<String> postLogoutUri(); | ||
|
||
/** | ||
* Additional metadata properties | ||
*/ | ||
Map<String, String> extraProps(); | ||
} | ||
} |
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
Oops, something went wrong.