Interface AuthorizationProviderFactory<T extends AuthorizationProvider>

Type Parameters:
T - The specific type of AuthorizationProvider that this factory can create. It must be a subtype of AuthorizationProvider.

public interface AuthorizationProviderFactory<T extends AuthorizationProvider>
A factory interface for creating instances of AuthorizationProvider. This design pattern allows for abstracting the creation process of a provider, making the code more flexible and easier to test.
  • Method Summary

    Modifier and Type
    Method
    Description
    connect(Credentials credentials)
    Creates and initializes an instance of AuthorizationProvider using the provided credentials.
  • Method Details

    • connect

      T connect(Credentials credentials)
      Creates and initializes an instance of AuthorizationProvider using the provided credentials. This method "connects" or configures the provider with the necessary credentials to retrieve secrets and authorization data.
      Parameters:
      credentials - The credentials required to connect to or configure the provider.
      Returns:
      A fully initialized instance of AuthorizationProvider, of the type specified by the generic parameter T.
      Throws:
      RuntimeException - if the connection or initialization fails (e.g., due to invalid credentials).