Package org.apache.gravitino.credential
Interface CredentialGenerator<T extends Credential>
- Type Parameters:
T- The type of credential this generator produces.
- All Superinterfaces:
AutoCloseable,Closeable
An interface for generating credentials. Implementations of this interface will contain the
actual logic for creating credentials and may have heavy dependencies. They are intended to be
loaded via reflection by a
CredentialProvider to avoid classpath issues during service
loading.-
Method Summary
Modifier and TypeMethodDescriptiongenerate(CredentialContext context) Generates a credential.voidinitialize(Map<String, String> properties) Initializes the credential generator with catalog properties.
-
Method Details
-
initialize
Initializes the credential generator with catalog properties.- Parameters:
properties- catalog properties that can be used to configure the provider. The specific properties required vary by implementation.
-
generate
Generates a credential.- Parameters:
context- The context providing necessary information for credential retrieval.- Returns:
- The generated credential.
- Throws:
Exception- if an error occurs during credential generation.
-