@InterfaceAudience.LimitedPrivate(value="authorization-subsystems")
@InterfaceStability.Unstable
public interface CustomTokenProviderAdaptee
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
Obtain the access token that should be added to https connection's header.
|
Date |
getExpiryTime()
Obtain expiry time of the token.
|
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
String accountName)
Initialize with supported configuration.
|
void initialize(org.apache.hadoop.conf.Configuration configuration,
String accountName)
throws IOException
configuration - Configuration objectaccountName - Account NameIOException - if instance can not be configured.String getAccessToken() throws IOException
getExpiryTime() expiry time is set,
so implementations should be performant. Implementations are responsible
for any refreshing of the token.IOException - if there is an error fetching the tokenDate getExpiryTime()
getAccessToken() call for every
connection then safe to return current or past time.
However recommended to use the token expiry time received from Azure Active
Directory.Copyright © 2008–2020 Apache Software Foundation. All rights reserved.