public interface SupportsCredentials
Modifier and Type | Method and Description |
---|---|
default Credential |
getCredential(java.lang.String credentialType)
Retrieves an
Credential object based on the specified credential type. |
Credential[] |
getCredentials()
Retrieves an array of
Credential objects. |
Credential[] getCredentials()
Credential
objects.Credential
objects. In most cases the array only contains one
credential. If the object like Fileset
contains multiple
locations for different storages like HDFS, S3, the array will contain multiple
credentials. The array could be empty if you request a credential for a catalog but the
credential provider couldn't generate the credential for the catalog, like S3 token
credential provider only generate credential for the specific object like Fileset
, Table
. There will be
at most one credential for one credential type.default Credential getCredential(java.lang.String credentialType) throws NoSuchCredentialException
Credential
object based on the specified credential type.credentialType
- The type of the credential like s3-token, s3-secret-key which defined in
the specific credentials.Credential
object with the specified credential type.NoSuchCredentialException
- If the specific credential cannot be found.