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 TypeMethodDescriptionvoidcreate(OidcTenantConfig tenantConfig) Creates OIDC tenant.voidcreateServiceApp(String authServerUrl) Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.SERVICEapplication type.voidcreateWebApp(String authServerUrl, String clientId, String clientSecret) Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.WEB_APPapplication type.
-
Method Details
-
create
Creates OIDC tenant.- Parameters:
tenantConfig- tenant config; must not be null
-
createServiceApp
Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.SERVICEapplication type.- Parameters:
authServerUrl-OidcCommonConfig.authServerUrl()
-
createWebApp
Creates default OIDC tenant with theOidcTenantConfig.ApplicationType.WEB_APPapplication type.- Parameters:
authServerUrl-OidcCommonConfig.authServerUrl()clientId-OidcClientCommonConfig.clientId()clientSecret-OidcClientCommonConfig.Credentials.secret()
-