Interface DuoOIDCClientRegistry

All Known Implementing Classes:
DefaultDuoOIDCClientRegistry

public interface DuoOIDCClientRegistry
A registry of DuoOIDCClients for DuoOIDCIntegrations.

The registry *must* be thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieve an existing, or create a new, Duo client for the given Duo integration.
  • Method Details

    • getClientOrCreate

      @Nonnull DuoOIDCClient getClientOrCreate(@Nonnull DuoOIDCIntegration integration) throws DuoRegistryException

      Retrieve an existing, or create a new, Duo client for the given Duo integration. The client should be fully initialised and safely published on return.

      implSpec: Only one client should exist per integration i.e. given the same integration, the same client instance should be returned.

      implNote: Clients could either be pre-registered, or lazy-initialised when first needed.

      Parameters:
      integration - the Duo integration to find a client for, never null.
      Returns:
      a DuoOIDCClient appropriate for this integration, never null.
      Throws:
      DuoRegistryException - if there is an issue locating or creating a Duo client.