Class: Mongo::Auth::Aws::Credentials Private
- Inherits:
-
Struct
- Object
- Struct
- Mongo::Auth::Aws::Credentials
- Defined in:
- lib/mongo/auth/aws/credentials.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The AWS credential set.
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#expiration ⇒ Object
Returns the value of attribute expiration.
-
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
-
#session_token ⇒ Object
Returns the value of attribute session_token.
Instance Method Summary collapse
-
#expired? ⇒ true | false
private
Whether the credentials have expired.
Instance Attribute Details
#access_key_id ⇒ Object
Returns the value of attribute access_key_id
24 25 26 |
# File 'lib/mongo/auth/aws/credentials.rb', line 24 def access_key_id @access_key_id end |
#expiration ⇒ Object
Returns the value of attribute expiration
24 25 26 |
# File 'lib/mongo/auth/aws/credentials.rb', line 24 def expiration @expiration end |
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key
24 25 26 |
# File 'lib/mongo/auth/aws/credentials.rb', line 24 def secret_access_key @secret_access_key end |
#session_token ⇒ Object
Returns the value of attribute session_token
24 25 26 |
# File 'lib/mongo/auth/aws/credentials.rb', line 24 def session_token @session_token end |
Instance Method Details
#expired? ⇒ true | false
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.
Returns Whether the credentials have expired.
26 27 28 29 30 31 32 33 34 |
# File 'lib/mongo/auth/aws/credentials.rb', line 26 def expired? if expiration.nil? false else # According to the spec, Credentials are considered # valid if they are more than five minutes away from expiring. Time.now.utc >= expiration - 300 end end |