Class CdpInteractiveLoginCredentialsProvider
java.lang.Object
com.cloudera.cdp.authentication.credentials.CdpInteractiveLoginCredentialsProvider
- All Implemented Interfaces:
CdpCredentialsProvider
public class CdpInteractiveLoginCredentialsProvider
extends Object
implements CdpCredentialsProvider
CdpCredentialsProvider implementation that provides credentials by
login to CDP interactively.
-
Constructor Summary
ConstructorDescriptionCdpInteractiveLoginCredentialsProvider
(CdpRegion cdpRegion, String accountId) Login to CDP interactively by the default identity provider.CdpInteractiveLoginCredentialsProvider
(CdpRegion cdpRegion, String accountId, String identityProvider) Login to CDP interactively.CdpInteractiveLoginCredentialsProvider
(String accountId) Login to CDP interactively by the default identity provider.CdpInteractiveLoginCredentialsProvider
(String accountId, String identityProvider) Login to CDP interactively.CdpInteractiveLoginCredentialsProvider
(String accountId, String identityProvider, String loginUrl, int port, Duration timeout) Login to CDP interactively by the given CDP login URL. -
Method Summary
Modifier and TypeMethodDescriptionReturns CdpCredentials which the caller can use to authenticate a CDP request.
-
Constructor Details
-
CdpInteractiveLoginCredentialsProvider
Login to CDP interactively by the default identity provider.- Parameters:
accountId
- The account id.
-
CdpInteractiveLoginCredentialsProvider
Login to CDP interactively by the default identity provider.- Parameters:
cdpRegion
- The region of the account.accountId
- The account id.
-
CdpInteractiveLoginCredentialsProvider
Login to CDP interactively.- Parameters:
accountId
- The account id.identityProvider
- The name or CRN of IdP used to login with. The default IdP will be used if null or empty.
-
CdpInteractiveLoginCredentialsProvider
public CdpInteractiveLoginCredentialsProvider(CdpRegion cdpRegion, String accountId, @Nullable String identityProvider) Login to CDP interactively.- Parameters:
cdpRegion
- The region of the account.accountId
- The account id.identityProvider
- The name or CRN of IdP used to login with. The default IdP will be used if null or empty.
-
CdpInteractiveLoginCredentialsProvider
public CdpInteractiveLoginCredentialsProvider(String accountId, @Nullable String identityProvider, String loginUrl, int port, Duration timeout) Login to CDP interactively by the given CDP login URL.- Parameters:
accountId
- The account id.identityProvider
- The name or CRN of IdP used to login with. The default IdP will be used if null or empty.loginUrl
- The CDP login URL.port
- The listening port number for CLI to receive the access token. A random un-used port will be assigned if the value is zero.timeout
- The login timeout duration.
-
-
Method Details
-
getCredentials
Description copied from interface:CdpCredentialsProvider
Returns CdpCredentials which the caller can use to authenticate a CDP request. Each implementation of CdpCredentialsProvider can chose its own strategy for loading credentials. For example, an implementation might load credentials from an existing key management system, or load new credentials when credentials are rotated.- Specified by:
getCredentials
in interfaceCdpCredentialsProvider
- Returns:
- CdpCredentials which the caller can use to authenticate an CDP request.
-