123456789_123456789_123456789_123456789_123456789_

Class: Mongo::Auth::Aws::Credentials Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: lib/mongo/auth/aws/credentials.rb

Overview

The AWS credential set.

Since:

  • 2.0.0

Instance Attribute Summary

Instance Attribute Details

#access_key_id (rw)

The AWS credential set.

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/auth/aws/credentials.rb', line 24

Credentials = Struct.new(:access_key_id, :secret_access_key, :session_token, :expiration)

#expiration (rw)

The AWS credential set.

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/auth/aws/credentials.rb', line 24

Credentials = Struct.new(:access_key_id, :secret_access_key, :session_token, :expiration)

#expired?true | false (readonly)

Returns:

  • (true | false)

    Whether the credentials have expired.

Since:

  • 2.0.0

[ GitHub ]

  
# 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

#secret_access_key (rw)

The AWS credential set.

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/auth/aws/credentials.rb', line 24

Credentials = Struct.new(:access_key_id, :secret_access_key, :session_token, :expiration)

#session_token (rw)

The AWS credential set.

Since:

  • 2.0.0

[ GitHub ]

  
# File 'lib/mongo/auth/aws/credentials.rb', line 24

Credentials = Struct.new(:access_key_id, :secret_access_key, :session_token, :expiration)