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 Details

    • create

      void create(OidcTenantConfig tenantConfig)
      Creates OIDC tenant.
      Parameters:
      tenantConfig - tenant config; must not be null
    • createServiceApp

      void createServiceApp(String authServerUrl)
      Creates default OIDC tenant with the OidcTenantConfig.ApplicationType.SERVICE application type.
      Parameters:
      authServerUrl - OidcCommonConfig.authServerUrl()
    • createWebApp

      void createWebApp(String authServerUrl, String clientId, String clientSecret)
      Creates default OIDC tenant with the OidcTenantConfig.ApplicationType.WEB_APP application type.
      Parameters:
      authServerUrl - OidcCommonConfig.authServerUrl()
      clientId - OidcClientCommonConfig.clientId()
      clientSecret - OidcClientCommonConfig.Credentials.secret()