Package io.quarkus.oidc
Interface Oidc
- All Known Implementing Classes:
OidcImpl
public interface Oidc
A CDI event that facilitates programmatic OIDC tenant setup.
OIDC tenants must be created from an observer method like in the example below:
public class OidcSetup {
void createDefaultTenant(@Observes Oidc oidc) {
var defaultTenant = OidcTenantConfig.authServerUrl("https://oidc-provider-hostname/").build();
oidc.create(defaultTenant);
}
}
The example above is equivalent to configuring quarkus.oidc.auth-server-url=https://oidc-provider-hostname/
in the application.properties.-
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(OidcTenantConfig tenantConfig) Creates OIDC tenant.void
createServiceApp
(String authServerUrl) Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.SERVICE
application type.void
createWebApp
(String authServerUrl, String clientId, String clientSecret) Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.WEB_APP
application type.
-
Method Details
-
create
Creates OIDC tenant.- Parameters:
tenantConfig
- tenant config; must not be null
-
createServiceApp
Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.SERVICE
application type.- Parameters:
authServerUrl
-OidcCommonConfig.authServerUrl()
-
createWebApp
Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.WEB_APP
application type.- Parameters:
authServerUrl
-OidcCommonConfig.authServerUrl()
clientId
-OidcClientCommonConfig.clientId()
clientSecret
-OidcClientCommonConfig.Credentials.secret()
-