com.amazon.redshift.plugin

## Class CommonCredentialsProvider

- java.lang.Object
- - com.amazon.redshift.plugin.CommonCredentialsProvider

All Implemented Interfaces:
  INativePlugin

Direct Known Subclasses:
  IdpTokenAuthPlugin

    public abstract class CommonCredentialsProvider
    extends Object
    implements INativePlugin

### Field Summary

Fields
`protected static Pattern` `IAM_HTTP_URL_PATTERN`
`protected static Pattern` `IAM_URL_PATTERN`
`protected static String` `KEY_SSL_INSECURE`
`protected Boolean` `m_disableCache`
`protected RedshiftLogger` `m_log`
`protected boolean` `m_sslInsecure`

### Constructor Summary

Constructors
Constructor and Description
`CommonCredentialsProvider()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`void` `addParameter(String key, String value)`
`protected abstract NativeTokenHolder` `getAuthToken()`
`String` `getCacheKey()`
`NativeTokenHolder` `getCredentials()`
`protected CloseableHttpClient` `getHttpClient()`
`String` `getIdpToken()`
`String` `getPluginSpecificCacheKey()`
`protected static String` `getRegexForJsonKey(String keyName)`
`void` `refresh()`
`void` `setLogger(RedshiftLogger log)`
`protected void` `validateURL(String paramString)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### m_disableCache

    protected Boolean m_disableCache

#### KEY_SSL_INSECURE

    protected static final String KEY_SSL_INSECURE

See Also:
  Constant Field Values

#### m_sslInsecure

    protected boolean m_sslInsecure

#### IAM_URL_PATTERN

    protected static final Pattern IAM_URL_PATTERN

#### IAM_HTTP_URL_PATTERN

    protected static final Pattern IAM_HTTP_URL_PATTERN

#### m_log

    protected RedshiftLogger m_log

### Constructor Detail

#### CommonCredentialsProvider

    public CommonCredentialsProvider()

### Method Detail

#### addParameter

    public void addParameter(String key,
                             String value)

Specified by:
  `addParameter` in interface `INativePlugin`

#### setLogger

    public void setLogger(RedshiftLogger log)

Specified by:
  `setLogger` in interface `INativePlugin`

#### getCredentials

    public NativeTokenHolder getCredentials()
                                     throws RedshiftException

Specified by:
  `getCredentials` in interface `INativePlugin`
Throws:
  `RedshiftException`

#### getAuthToken

    protected abstract NativeTokenHolder getAuthToken()
                                               throws IOException

Throws:
  `IOException`

#### refresh

    public void refresh()
                 throws RedshiftException

Specified by:
  `refresh` in interface `INativePlugin`
Throws:
  `RedshiftException`

#### getIdpToken

    public String getIdpToken()
                       throws RedshiftException

Specified by:
  `getIdpToken` in interface `INativePlugin`
Throws:
  `RedshiftException`

#### getPluginSpecificCacheKey

    public String getPluginSpecificCacheKey()

Specified by:
  `getPluginSpecificCacheKey` in interface `INativePlugin`

#### getCacheKey

    public String getCacheKey()

Specified by:
  `getCacheKey` in interface `INativePlugin`

#### getHttpClient

    protected CloseableHttpClient getHttpClient()
                                         throws GeneralSecurityException

Throws:
  `GeneralSecurityException`

#### validateURL

    protected void validateURL(String paramString)
                        throws IOException

Throws:
  `IOException`

#### getRegexForJsonKey

    protected static String getRegexForJsonKey(String keyName)