Package org.apache.gravitino.credential
Interface Credential
- All Known Implementing Classes:
ADLSTokenCredential
,AwsIrsaCredential
,AzureAccountKeyCredential
,CredentialDTO
,GCSTokenCredential
,OSSSecretKeyCredential
,OSSTokenCredential
,S3SecretKeyCredential
,S3TokenCredential
public interface Credential
Interface representing a credential with type, expiration time, and additional information.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns credential information.Returns the type of the credential.long
Returns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.void
initialize
(Map<String, String> credentialInfo, long expireTimeInMs) Initialize the credential with the credential information.Converts the credential to properties to transfer the credential though API.
-
Field Details
-
CREDENTIAL_TYPE
Credential type in the credential.- See Also:
-
EXPIRE_TIME_IN_MS
Credential expire time in ms since the epoch.- See Also:
-
-
Method Details
-
credentialType
String credentialType()Returns the type of the credential. It should be the same as the credential type of the credential provider.- Returns:
- the credential type as a String.
-
expireTimeInMs
long expireTimeInMs()Returns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.- Returns:
- the expiration time as a long.
-
credentialInfo
Returns credential information.- Returns:
- a map of credential information.
-
initialize
Initialize the credential with the credential information.This method is invoked to deserialize the credential in client side.
- Parameters:
credentialInfo
- The credential information fromcredentialInfo()
.expireTimeInMs
- The expire-time fromexpireTimeInMs()
.
-
toProperties
Converts the credential to properties to transfer the credential though API.- Returns:
- a map containing credential properties.
-