com.amazon.redshift.plugin

## Class IdpTokenAuthPlugin

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

All Implemented Interfaces:
  INativePlugin

    public class IdpTokenAuthPlugin
    extends CommonCredentialsProvider

A basic credential provider class. This plugin class allows clients to directly provide any auth token that is handled by Redshift.

### Field Summary

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

### Fields inherited from class com.amazon.redshift.plugin.CommonCredentialsProvider

`m_disableCache`

### Constructor Summary

Constructors
Constructor and Description
`IdpTokenAuthPlugin()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addParameter(String key, String value)`
`protected NativeTokenHolder` `getAuthToken()` This overridden method needs to return the auth token provided by the client
`protected CloseableHttpClient` `getHttpClient()`
`protected static String` `getRegexForJsonKey(String keyName)`
`protected void` `validateURL(String paramString)`

### Methods inherited from class com.amazon.redshift.plugin.CommonCredentialsProvider

`getCacheKey, getCredentials, getIdpToken, getPluginSpecificCacheKey, refresh, setLogger`

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

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

### Field Detail

#### 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

#### IdpTokenAuthPlugin

    public IdpTokenAuthPlugin()

### Method Detail

#### getAuthToken

    protected NativeTokenHolder getAuthToken()
                                      throws IOException

This overridden method needs to return the auth token provided by the client

Specified by:
  `getAuthToken` in class `CommonCredentialsProvider`
Returns:
  `NativeTokenHolder` A wrapper containing auth token and its expiration time information
Throws:
  `IOException` - indicating that some required parameter is missing.

#### addParameter

    public void addParameter(String key,
                             String value)

Specified by:
  `addParameter` in interface `INativePlugin`
Overrides:
  `addParameter` in class `CommonCredentialsProvider`

#### 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)