Module: Aws::RefreshingCredentials Private
- Included in:
- AssumeRoleCredentials, InstanceProfileCredentials
- Defined in:
- lib/aws-sdk-core/refreshing_credentials.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Base class used credential classes that can be refreshed. This provides basic refresh logic in a thread-safe manor. Classes mixing in this module are expected to implement a #refresh method that populates the following instance variables:
-
‘@access_key_id`
-
‘@secret_access_key`
-
‘@session_token`
-
‘@expiration`
Instance Method Summary collapse
- #access_key_id ⇒ String? private
- #expiration ⇒ Time? private
- #initialize(options = {}) ⇒ Object private
-
#refresh! ⇒ void
private
Refresh credentials.
- #secret_access_key ⇒ String? private
- #session_token ⇒ String? private
Instance Method Details
#access_key_id ⇒ String?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 |
# File 'lib/aws-sdk-core/refreshing_credentials.rb', line 24 def access_key_id refresh_if_near_expiration @access_key_id end |
#expiration ⇒ Time?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 45 |
# File 'lib/aws-sdk-core/refreshing_credentials.rb', line 42 def expiration refresh_if_near_expiration @expiration end |
#initialize(options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 21 |
# File 'lib/aws-sdk-core/refreshing_credentials.rb', line 18 def initialize( = {}) @mutex = Mutex.new refresh end |
#refresh! ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Refresh credentials.
49 50 51 |
# File 'lib/aws-sdk-core/refreshing_credentials.rb', line 49 def refresh! @mutex.synchronize { refresh } end |
#secret_access_key ⇒ String?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 33 |
# File 'lib/aws-sdk-core/refreshing_credentials.rb', line 30 def secret_access_key refresh_if_near_expiration @secret_access_key end |
#session_token ⇒ String?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 |
# File 'lib/aws-sdk-core/refreshing_credentials.rb', line 36 def session_token refresh_if_near_expiration @session_token end |