NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class AbstractRefreshableCredentials

Abstract decorator to provide a foundation for refreshable credentials

  Aws\Common\Credentials\AbstractCredentialsDecorator implements Aws\Common\Credentials\CredentialsInterface
  Aws\Common\Credentials\AbstractRefreshableCredentials

### Direct known subclasses

`Aws\Common\Credentials\CacheableCredentials`, `Aws\Common\Credentials\RefreshableInstanceProfileCredentials`

Abstract
Namespace: Aws\Common\Credentials
Located at Aws/Common/Credentials/AbstractRefreshableCredentials.php

## Methods summary

- `public` `getCredentials ( )`

  Get the underlying credentials, refreshing if necessary.

- `public` `getAccessKeyId ( )`

  Returns the AWS access key ID for this credentials object.

- `public` `getSecretKey ( )`

  Returns the AWS secret access key for this credentials object.

- `public` `getSecurityToken ( )`

  Get the associated security token if available

- `public` `serialize ( )`
- `abstract protected` `refresh ( )`

  Attempt to get new credentials

## Methods detail

# `public `Aws\Common\Credentials\Credentials``
`getCredentials( )`

Get the underlying credentials, refreshing if necessary.

#### Returns

``Aws\Common\Credentials\Credentials``
# `public string`
`getAccessKeyId( )`

Returns the AWS access key ID for this credentials object.

#### Returns

`string`

#### Overrides

`Aws\Common\Credentials\AbstractCredentialsDecorator::getAccessKeyId`
# `public string`
`getSecretKey( )`

Returns the AWS secret access key for this credentials object.

#### Returns

`string`

#### Overrides

`Aws\Common\Credentials\AbstractCredentialsDecorator::getSecretKey`
# `public string|null`
`getSecurityToken( )`

Get the associated security token if available

#### Returns

`string|null`

#### Overrides

`Aws\Common\Credentials\AbstractCredentialsDecorator::getSecurityToken`
# `public`
`serialize( )`

#### Overrides

`Aws\Common\Credentials\AbstractCredentialsDecorator::serialize`
# `abstract protected`
`refresh( )`

Attempt to get new credentials

### Methods inherited from Aws\Common\Credentials\AbstractCredentialsDecorator

`__construct()`, `getExpiration()`, `isExpired()`, `setAccessKeyId()`, `setExpiration()`, `setSecretKey()`, `setSecurityToken()`, `unserialize()`

### Magic methods summary

## Properties summary

### Properties inherited from Aws\Common\Credentials\AbstractCredentialsDecorator

`$credentials`