com.amazon.redshift.plugin

## Class JwtCredentialsProvider

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

All Implemented Interfaces:
  IPlugin

Direct Known Subclasses:
  BasicJwtCredentialsProvider

    public abstract class JwtCredentialsProvider
    extends Object
    implements IPlugin

### Field Summary

Fields
`protected String` `m_dbUser`
`protected Boolean` `m_disableCache`
`protected int` `m_duration`
`protected String` `m_jwt`
`protected RedshiftLogger` `m_log`
`protected String` `m_region`
`protected String` `m_roleArn`
`protected String` `m_roleSessionName`
`protected String` `m_stsEndpoint`

### Constructor Summary

Constructors
Constructor and Description
`JwtCredentialsProvider()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `addParameter(String key, String value)`
`protected void` `checkRequiredParameters()`
`protected String[]` `decodeJwt(String jwt)`
`protected String` `deriveDatabaseUser(String[] decodedJwt)`
`CredentialsHolder` `getCredentials()`
`String` `getPluginSpecificCacheKey()`
`protected abstract String` `processJwt(String jwt)`
`void` `refresh()`
`void` `setLogger(RedshiftLogger log)`

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

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

### Field Detail

#### m_roleArn

    protected String m_roleArn

#### m_jwt

    protected String m_jwt

#### m_roleSessionName

    protected String m_roleSessionName

#### m_duration

    protected int m_duration

#### m_dbUser

    protected String m_dbUser

#### m_stsEndpoint

    protected String m_stsEndpoint

#### m_region

    protected String m_region

#### m_log

    protected RedshiftLogger m_log

#### m_disableCache

    protected Boolean m_disableCache

### Constructor Detail

#### JwtCredentialsProvider

    public JwtCredentialsProvider()

### Method Detail

#### processJwt

    protected abstract String processJwt(String jwt)
                                  throws IOException

Throws:
  `IOException`

#### addParameter

    public void addParameter(String key,
                             String value)

Specified by:
  `addParameter` in interface `IPlugin`

#### setLogger

    public void setLogger(RedshiftLogger log)

Specified by:
  `setLogger` in interface `IPlugin`

#### getCredentials

    public CredentialsHolder getCredentials()

#### refresh

    public void refresh()

#### getPluginSpecificCacheKey

    public String getPluginSpecificCacheKey()

Specified by:
  `getPluginSpecificCacheKey` in interface `IPlugin`

#### checkRequiredParameters

    protected void checkRequiredParameters()
                                    throws IOException

Throws:
  `IOException`

#### decodeJwt

    protected String[] decodeJwt(String jwt)

#### deriveDatabaseUser

    protected String deriveDatabaseUser(String[] decodedJwt)