Class CloudPakForDataAuthenticator

  • All Implemented Interfaces:
    Authenticator

    public class CloudPakForDataAuthenticator
    extends TokenRequestBasedAuthenticator<Cp4dToken,​Cp4dTokenResponse>
    implements Authenticator
    This class provides an Authenticator implementation for the "CloudPakForData" environment. This authenticator will use the configured url and other properties to automatically fetch an access token from the CloudPakForData token service. When the access token expires, a new access token will be fetched. This authenticator uses the "POST /v1/authorize" operation supported by the CloudPakForData token service. As such, you can configure either the username and passord properies, or the username and apikey properties. The url, username and one of password/apikey are required.
    • Constructor Detail

      • CloudPakForDataAuthenticator

        @Deprecated
        public CloudPakForDataAuthenticator​(java.lang.String url,
                                            java.lang.String username,
                                            java.lang.String password)
        Deprecated.
        As of 9.7.0, use CloudPakForDataAuthenticator.Builder() instead.
        Constructs a CloudPakForDataAuthenticator with required properties configured with username/password.
        Parameters:
        url - the base URL associated with the token service. The path "/v1/authorize" will be appended to this value automatically.
        username - the username to be used when retrieving the access token
        password - the password to be used when retrieving the access token
      • CloudPakForDataAuthenticator

        @Deprecated
        public CloudPakForDataAuthenticator​(java.lang.String url,
                                            java.lang.String username,
                                            java.lang.String password,
                                            boolean disableSSLVerification,
                                            java.util.Map<java.lang.String,​java.lang.String> headers)
        Deprecated.
        As of 9.7.0, use CloudPakForDataAuthenticator.Builder() instead.
        Constructs a CloudPakForDataAuthenticator with all properties configured with username/password.
        Parameters:
        url - the base URL associated with the token service. The path "/v1/authorize" will be appended to this value automatically.
        username - the username to be used when retrieving the access token
        password - the password to be used when retrieving the access token
        disableSSLVerification - a flag indicating whether SSL hostname verification should be disabled
        headers - a set of user-supplied headers to be included in token service interactions
      • CloudPakForDataAuthenticator

        @Deprecated
        public CloudPakForDataAuthenticator​(java.util.Map<java.lang.String,​java.lang.String> config)
        Deprecated.
        As of 9.7.0, use CloudPakForDataAuthenticator.fromConfiguration() instead.
        Construct a CloudPakForDataAuthenticator instance using properties retrieved from the specified Map.
        Parameters:
        config - a map containing the configuration properties
    • Method Detail

      • fromConfiguration

        public static CloudPakForDataAuthenticator fromConfiguration​(java.util.Map<java.lang.String,​java.lang.String> config)
        Construct a CloudPakForDataAuthenticator instance using properties retrieved from the specified Map.
        Parameters:
        config - a map containing the configuration properties
        Returns:
        the CloudPakForDataAuthenticator instance
      • getURL

        public java.lang.String getURL()
        Returns:
        the URL configured for this authenticator
      • getUsername

        public java.lang.String getUsername()
        Returns:
        the username configured for this authenticator
      • getPassword

        public java.lang.String getPassword()
        Returns:
        the password configured for this authenticator
      • getApikey

        public java.lang.String getApikey()
        Returns:
        the apikey configured for this authenticator