java.lang.Object
com.irurueta.authserver.authorization.api.web.clients.ClientSeeder
All Implemented Interfaces:
org.springframework.boot.ApplicationRunner

@Component @EnableConfigurationProperties(ClientSeedProperties.class) public class ClientSeeder extends Object implements org.springframework.boot.ApplicationRunner
Seeds the configured default clients at startup. The run is idempotent: clients that already exist are left alone. Only the clients whose redirect URIs are configured in ClientSeedProperties are seeded, so a deployment never gets a client (or a localhost redirect URI) it did not ask for. The secret of the confidential bff client comes from the environment; when it is not configured, the confidential client is skipped with a warning instead of being created with a weak secret.
  • Field Details

    • seedRegisteredClientsUseCase

      private final SeedRegisteredClientsUseCase seedRegisteredClientsUseCase
      Seeds the clients.
    • properties

      private final ClientSeedProperties properties
      Seed configuration.
    • apiAudience

      @Value("${authserver.api.audience:auth-server}") private final String apiAudience
      Audience of the authorization server's own API, given to the seeded clients.
  • Constructor Details

    • ClientSeeder

      public ClientSeeder()
  • Method Details

    • run

      public void run(org.springframework.boot.ApplicationArguments args)
      Seeds the configured default clients that do not exist yet.
      Specified by:
      run in interface org.springframework.boot.ApplicationRunner
      Parameters:
      args - the application arguments.