Class CdpInteractiveLoginCredentialsProvider

    • Constructor Detail

      • CdpInteractiveLoginCredentialsProvider

        public CdpInteractiveLoginCredentialsProvider​(String accountId)
        Login to CDP interactively by the default identity provider.
        Parameters:
        accountId - The account id.
      • CdpInteractiveLoginCredentialsProvider

        public CdpInteractiveLoginCredentialsProvider​(String accountId,
                                                      @Nullable
                                                      String identityProvider)
        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​(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 Detail

      • getCredentials

        public CdpCredentials 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 interface CdpCredentialsProvider
        Returns:
        CdpCredentials which the caller can use to authenticate an CDP request.