Interface AuthorizationProviderFactory<T extends AuthorizationProvider>
- Type Parameters:
T- The specific type ofAuthorizationProviderthat this factory can create. It must be a subtype ofAuthorizationProvider.
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 TypeMethodDescriptionconnect(Credentials credentials) Creates and initializes an instance ofAuthorizationProviderusing the provided credentials.
-
Method Details
-
connect
Creates and initializes an instance ofAuthorizationProviderusing 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 parameterT. - Throws:
RuntimeException- if the connection or initialization fails (e.g., due to invalid credentials).
-